CBSE Class 12 Computer Science Question 85 of 145

File Handling — Question 2

Back to all questions
2
Question

Question 2

What is the significance of a file-object ?

Answer

File objects are used to read and write data to a file on disk. The file object is used to obtain a reference to the file on disk and open it for a number of different tasks. File object is very important and useful tool as through a file object only, a Python program can work with files stored on hardware. All the functions that we perform on a data file are performed through file objects.