← 返回列表

Python3 文件File Flush 方法

Python3 文件File Flush 方法 #!/usr/bin/python3 # Open a file fo = open("foo.txt", "wb") print ("Name of the file: ", fo.name) # Here it does nothing, but you can call it with read operation. fo.flush() # Close opend file fo.close()

Python3 文件File Flush 方法

#!/usr/bin/python3

# Open a file
fo = open("foo.txt", "wb")
print ("Name of the file: ", fo.name)

# Here it does nothing, but you can call it with read operation.
fo.flush()

# Close opend file
fo.close()

打开资源 ↗

交流与评论