Class 12 · Computer Science · Old NCERT
Chapter 2: File Handling in Python
In this chapter
"File Handling in Python" covers text and binary files, opening and closing files, reading and writing, and the pickle module.
- Chapter
- 2 of 13
- Textbook
- Computer Science
- Class
- Class 12 · Computer Science
- Edition
- Old NCERT
- Topics
- 4
Topics covered
- Text files
- Binary files
- Reading and writing
- Pickle module
How to study this chapter
For "File Handling in Python", read each concept and immediately try the example code or commands on a computer.
- Practise the exercise programs yourself, trace outputs by hand, and keep notes on syntax and common errors.
Exam focus
For the Class 12 board exam and practicals, "File Handling in Python" is best prepared at a computer: type and run the examples, then write the programs or queries in the exercises yourself.
- Short-answer questions often ask for definitions and outputs, so practise tracing code by hand as well.
Where this chapter fits
This is Chapter 2 of 13 in the old-edition NCERT Computer Science textbook for Class 12.
- It comes after Chapter 1, "Exception Handling in Python", and is followed by Chapter 3, "Stack".
Using this page
Use the buttons on this page to download the Chapter 2 PDF and the NCERT Archive solution PDF for "File Handling in Python" side by side.
- The complete Computer Science book PDF for Class 12 is available on the book page.
Looking for the whole textbook? Open the complete book PDF.