Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def write_file(path, content):
file_to_write = open(path, "w")
file_to_write.write(content)
file_to_write.close()
def read_file(path):
with open(path, 'r') as file_to_read:
data = file_to_read.read()
return data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.