This is a core module in Python

General Edit

Pickle is a core module used for storing even more complicated data to files.
This means it can be used not only for Strings, but only for non-primitive data-types like dictionaries, tuples and others.

To start use:

import pickle

Functions Edit

dump(object, file) Edit

This writes the passed object to the passed file. Basis syntax for this:

f = open('test.txt','w')
x = {'core':'module'}
pickle.dump(x, f)

dumps(object) Edit

Returns a string format of the passed object

load(file) Edit

Loads an object from file.
Syntax from example above:

x = pickle.load(f)

loads(string) Edit

Loads an object from string

Community content is available under CC-BY-SA unless otherwise noted.