demo_python_ref_file_flush.py:
x
 
f = open("myfile.txt", "a")
f.write("Now the file has one more line!")
f.flush()
f.write("...and another one!")
C:\Users\My Name>python demo_python_ref_file_flush.py