python-challange/utils/read.py

15 lines
323 B
Python
Raw Normal View History

2021-10-30 22:03:22 +00:00
"""
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