Question

Explain how file handling works in Python for text files. Mention different file modes, and a short description of read(), readline() and write().

25 Mar 2026
Answer :
Word Count : 298
In Python, file handling allows programs to create, read, update, and delete files. To work with a text file, the `open()` function is used, which returns a file object. The basic syntax is `file = open(filename, mode)`, where `filename` is the name of the file, and `mode` specifies the operation to be performed on the file. Common file modes ___ _______ ____ ______ ______ ________.
_______ ________ ___ _______ ____ ____ _______ _________.
________ _____ ____ ___ __________ _____ ______ ________ ______ _______.
________ __________ _________ ____ ___ ___ ___ ___ ________ ___ _____ ______.
__________ _______ _____ ________ ____ __________ ________ _____ _____ ______.
_________ ___ _________ ____ ______ ____ _____ _______ ______ __________ _______.
___ _______ _____ ______ __________ ________.
_______ ____ ___ __________ ____ _____ _________ ________.
__________ __________ ___ _____ _______ __________ _______ ____.
___ ___ ____ _________ ____ ____ __________ _____ __________ ___ __________ ________.
______ __________ _________ _____ ______ ______ ___ _____ _________ ___.
________ _________ ______ __________ ____ _________.
___ _______ ________ _________ ___ ________ _____ _______ ___ ____ _______.
____ ___ ___ ___ __________.
__________ ___ ________ ________ ______ ______ ______ _______ _________ _____ ___.
______ _____ _______ ____ __________ ___ _________ _______ _______ _________ _______ __________.
______ ________ ______ _____ ___.
_________ ___ _____ ____ _____ __________ ____ _____ _________ ___ ________.
_________ ________ _________ ________ ____ _______ _________ ________ ___.
______ __________ ______ ___ _______ ___ ______.
______ _______ __________ _______ ______ ___ _____ _________ ____ ______ ______.
________ __________ ___ ________ ________ _____ __________ ________ ___.
______ ________ ___ __________ ________.
________ _______ __________ __________ _______ ________ ______ ________.
___ ___ __________ _________ ________.
_______ ___ __________ ______ ____ ___ ______ ______ _________ ____ __________ _______.
_____ ____ _____ _________ ____ _________ _____ ____ ___.
______ _________.
Get Full Answer on WhatsApp
IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Explain how file handling works in Python for text files. Mention diff
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support