pickle

In [5]:
import pickle

pickle is used to serialize and deserialize python objects.

In [6]:
some_object = {'title':'Dunkirk', 'length':'1:46', 'certificate':'12A'}
pickle.dump(some_object, open('movie.pkl', 'wb'))
In [ ]:
pickle.load(open('movie.pkl', 'rb'))