<AptiCode/>

Question 486: How can you close a file in Python after performing operations on it?

tcs
wipro
infosys
general
aptitude
reading-and-writing-files
python-programming

To close a file in Python, you should use theclose()method on the file object.