In this section you learned that:

with open("file.txt") as file:
    content = file.read()
with open("file.txt", "w") as file:
    content = file.write("Sample text")
with open("file.txt", "a") as file:
    content = file.write("More sample text")
with open("file.txt", "a+") as file:
    content = file.write("Even more sample text")
    file.seek(0)
    content = file.read()