Python | File handling quiz | Question 8

Last Updated :
Discuss
Comments

What is the purpose of the 'with' statement in file handling?

It creates a new file

It automatically closes the file

It appends data to a file

It reads the entire file at once

Share your thoughts in the comments