- Home
- Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. 'Pickling' is the process
Class - 12 CBSE Computer Science — Assertion Reason Type Questions
Assertion. 'Pickling' is the process whereby a Python object hierarchy is converted into a byte-stream.
Reason. A binary file works with byte-streams.
Answer
(b)
Both Assertion and Reason are true but Reason is not the correct explanation of Assertion.
Explanation
A binary file works with byte-streams and 'Pickling' is the process in binary file, where a Python object hierarchy is converted into a byte-stream. Binary files are commonly used as the destination for pickled data. This is because binary files can efficiently store raw binary data, including the byte-streams produced by pickling.