adplus-dvertising
frame-decoration

Question

How do you close a file object (fp)?

a.

close(fp)

b.

fclose(fp)

c.

fp.close()

d.

fp.__close__()

Answer: (c).fp.close()

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. How do you close a file object (fp)?