Files
Use with open() to read and write files. The with block closes the file for you, even if an error happens. File contents arrive as strings.
with open("notes.txt", "w") as f:
f.write("hello")
with open("notes.txt") as f:
print(f.read())
Test yourself on this