Q. Which function is used to close a file in python?

  • (A) close()
  • (B) stop()
  • (C) end()
  • (D) closefile()
πŸ’¬ Discuss
βœ… Correct Answer: (A) close()
Explanation: f.close()to close it and free up any system resources taken up by the open file.

Explanation by: Mr. Dubey
f.close()to close it and free up any system resources taken up by the open file.

πŸ’¬ Discussion

πŸ“Š Question Analytics

πŸ‘οΈ
300
Total Visits
πŸ“½οΈ
3 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
95%
Success Rate