Advertisements
Advertisements
Question
Define pickling in Python. Explain serialization and deserialization of Python object.
Short/Brief Note
Advertisements
Solution
Pickling or Serialization is the process of converting Python object hierarchy into a byte stream so that it can be written into a file.
Pickling converts an object byte stream in such a way that it can be reconstructed in original from when unpickled or deserialised.
Deserialization or Unpickling is the inverse process of Pickling where a byte stream is converted into an object hierarchy. Unpickling produces the exact replica of the original object.
shaalaa.com
The Pickle Module in Python
Is there an error in this question or solution?
