Examveda

What will be the output of the following Python code?
fo = open("foo.txt", "wb")
print "Name of the file: ", fo.name
fo.flush()
fo.close()

A. Compilation Error

B. Runtime Error

C. No Output

D. Flushes the file when closing them

Answer: Option D


This Question Belongs to Python Program >> Files Handling In Python

Join The Discussion

Related Questions on Files Handling in Python