Как автоосоветь в питоне

file = open("YOUR TEXT FILE.txt", "w") #w for clear all txt and type and a for append
file.write("hi" + \n) #\n for newlie optional
file.close() #to close file

#Discord: Fighter x Yt#6699 ( dm for questions )
Upset Unicorn