File Handling: Text Files Class 12 Notes PDF 2026-27 | Computer Science Chapter 4 Skip to content
Smart Notes for Every Exam · instant PDF download after payment +91 92520 37565
Class 12 · Computer Science · Chapter 4

File Handling: Text Files: complete notes

Neat, exam-ready notebook-style notes for File Handling: Text Files, following your NCERT book. This chapter is part of the complete Complete Computer Science Notes for Class 12 (CBSE 083, 2026-27).

Cover of Complete Computer Science Notes for Class 12 (CBSE 083, 2026-27)
Get all 14 chapters of Class 12 Computer Science
US$2.99US$3.9920% off
Free sample

Board questions: File Handling: Text Files: CBSE previous year questions with solutions →

Free preview: File Handling: Text Files notes

A quick look at the chapter from our Class 12 Computer Science notes. The full chapter notes have the detailed explanations, diagrams and practice questions with answers.

Text files File types, paths ★text, binary, CSV; absolute/relative open, modes, with ★★★r r+ w w+ a a+ read/write methods ★★★read, readline(s), write(lines) 3-mark programs ★★★count/display lines, words, chars
Chapter map from the notes

Topics in this chapter ★★★ very important · ★★ important · ★ asked sometimes

  1. 4.1 Files and their types ★★
  2. 4.2 Opening and closing a file ★★★
  3. 4.3 Writing to a text file ★★
  4. 4.4 Reading from a text file ★★★
  5. 4.5 seek() and tell() ★★
  6. 4.6 Standard text-file programs ★★★
  7. Multiple choice: 20 MCQs

Last-night summary

  • Modes r (default, must exist), r+, w (truncate), w+, a (end, keep), a+; with = auto close; close() flushes the buffer.
  • read() string, read(n), readline() one line ('' at EOF), readlines() list; write() returns count, writelines() list; tell(); seek(offset, 0/1/2), −1 invalid.
  • 3-mark template: def → with open → read/split/loop → test → count/print → return/close.
See real pages (free sample)

What you get in the pack

All chapters in this pack

  1. Python Revision Tour
  2. Functions
  3. Exception Handling
  4. File Handling: Text Files
  5. Binary Files (pickle)
  6. CSV Files
  7. Data Structure: Stack
  8. Networks I: Data Communication and Media
  9. Networks II: Devices, Topologies, Types
  10. Network Protocols and Web Services
  11. Database Concepts and the Relational Model
  12. SQL I: DDL, DML and Queries
  13. SQL II: Aggregates, GROUP BY, Joins
  14. Interface of Python with MySQL
← Exception Handling Binary Files (pickle) →

Prices shown in US dollars. Show prices in: ₹ INR · US$ USD