CBSE Class 12 Computer Science Question 88 of 145

File Handling — Question 5

Back to all questions
5
Question

Question 5

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
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.