python-challange/utils/read.py
2021-10-31 00:03:22 +02:00

15 lines
323 B
Python

"""
Sone utility functions that can be reused for the python challenge.
"""
def read_string(path):
"""
Read a string from a file provided by a path string.
:param path: A path string
:return: file content as a string
"""
with open(path) as file:
string = file.read()
return string