Monday, April 21, 2025

Write Data to a File - Python File Write

file = open('test-file.txt', 'w')

file.write('first line \n')
file.write('second line \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 .  ...