Monday, April 21, 2025

How to Add Text to a File - Python File Append

file = open('append-test.txt', 'a')

file.write('------------------ \n')
file.write('more \n')
file.write('lines \n')

file.close()

No comments:

Post a Comment

Tkinter Introduction - Top Widget, Method, Button

First, let's make shure that our tkinter module is working ok with simple  for loop that will spawn 5 instances of blank Tk window .  ...