Function | Description |
---|---|
pickle.dump(obj, file) | Serializes `obj` and writes it to a file object `file`. |
pickle.dumps(obj) | Serializes `obj` to a byte stream. |
pickle.load(file) | Deserializes a byte stream from a file object `file` back into a Python object. |
pickle.loads(bytes_obj) | Deserializes `bytes_obj` back into a Python object. |
Pickling is used to serialize objects, converting Python object hierarchy to byte stream.
Additional Context:
Serialization Process :
pickle
moduleKey Features:
Correct Answer: (2) It is used to serialize objects, i.e., to convert Python object hierarchy to byte stream.
The following data shows the number of students in different streams in a school:
Which type of graph is best suited to represent this data?
What comes next in the series?
\(2, 6, 12, 20, 30, \ ?\)