Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
f = open("demofile2.txt", "a") f.truncate(20) f.close() #open and read the file after the truncate: f = open("demofile2.txt", "r") print(f.read())
Hello! Welcome to de