>A Byte of Python

Pickle

Python provides a standard module called pickle which you can use to store any Python object to a file and then get it back later. This is called storing the object persistently.

There is another module called cPickle which acts just the pickle module except that is written in the C language and is (upto 1000 times) faster. You can use either of these modules, although we will be using the cPickle module here. Remember though, that here we refer to both these modules as the pickle module.