Skip to content

Instantly share code, notes, and snippets.

@LiamJolly
Created February 20, 2017 19:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LiamJolly/c0e4bdaa289a7423a4540ec2582b48ef to your computer and use it in GitHub Desktop.
Save LiamJolly/c0e4bdaa289a7423a4540ec2582b48ef to your computer and use it in GitHub Desktop.
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