Question:

What is pickling in Python?

Updated On: Mar 29, 2025
  • It is used to deserialize objects, i.e., converting the byte stream to object hierarchy.
  • It is used to serialize objects, i.e., to convert Python object hierarchy to byte stream.
  • It is used to move the file pointer to a specific location.
  • It is used in exception handling.
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

Pickling is used to serialize objects, converting Python object hierarchy to byte stream.

Additional Context:

Serialization Process :

  • Converts objects to byte stream for storage/transmission
  • Preserves object state and structure
  • Uses Python's pickle module

Key Features:

  • Handles complex Python objects (lists, dicts, classes)
  • Binary format (not human-readable)
  • Platform-independent

Correct Answer: (2) It is used to serialize objects, i.e., to convert Python object hierarchy to byte stream.

Was this answer helpful?
0
0