File Handling2
Topic:
Operation on a Text File
• Prepared by:
• Prateek Bisht
• MVM Pithoragarh
, Operation on a Text File.
• Python provide many operations on a
text file:
Open()
Close()
Reading data from a text file
Writing data to a text file.
, Reading from a file.
• Python provides mainly 3 types of read
functions to read data from a text file. But
before reading a file, the file must be opened
and linked via a file object or file handle.
• Types of read functions:
read() function
readline() function
readlines() function