How do you append to a file?

with open("test.txt", "a") as myfile:
    myfile.write("appended text")

Leave a Comment