Computer Science

Which of the following Python modules is imported to store and retrieve objects using the process of serialization and deserialization ?

  1. csv
  2. binary
  3. math
  4. pickle

Python File Handling

3 Likes

Answer

pickle

Reason — The pickle module in Python is imported to store and retrieve objects using the process of serialization and deserialization. It allows us to convert Python objects into a byte stream for storage or transmission (serialization) and to convert a byte stream into Python objects (deserialization). This process is commonly referred to as pickling and unpickling. The pickle module provides functions like dump() and load() for serialization and deserialization, respectively.

Answered By

2 Likes


Related Questions