KnowledgeBoat Logo

Computer Science

Assertion. 'Pickling' is the process whereby a Python object hierarchy is converted into a byte-stream.

Reason. A binary file works with byte-streams.

Python File Handling

2 Likes

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.

Answered By

3 Likes


Related Questions