Definition
The flush() method cleans out the internal buffer.
Syntax
file.flush()
Parameters
No Parameters.
Examples:
f = open("myFile.txt", "a")
f.write("Adding one more line to my file!")
f.flush()
f.write("...and another one!")
The flush() method cleans out the internal buffer.
file.flush()
No Parameters.
f = open("myFile.txt", "a")
f.write("Adding one more line to my file!")
f.flush()
f.write("...and another one!")