主页
Python
Python File flush() 方法
demo_ref_file_flush
运行 ❯
×
更改方向
保存代码
更改主题
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_file_flush.py