Python Program to Append to a File

Open file in append mode and write to it

The content of the file my_file.txt is

 with open("my_file.txt", "a") as f:

   f.write("new text")

0 Comments