<AptiCode/>

Question 487: In Python, what does thewithstatement provide when working with files?

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

Thewithstatement is used for efficient file handling and automatically closes the file when the block is exited.