File Handling Notes Class XII
File Handling Notes Class XII
Introduction to Files
Python files are used to permanently store input data and outputs. File storage allows reusability and
Types of Files
- Binary File: Non-human-readable, stores actual content (images, audio, etc.) as byte stream.
- Common modes: 'r' (read), 'w' (write), 'a' (append), '+r' (read/write), 'b' (binary).
Pickle Module
- Used to serialize (dump) and deserialize (load) Python objects to/from binary files.