Pickle and Unpickle

It is used to serialize python objects into binary.

import pickle
 
pickle.dump("{'a': 'b'}", file) # file is file object
with open('./obj', 'rb') as file:
    print(pickle.load(file))