1# Using a list, tuple, or dict is by far the most common way to do this:
2
3import pickle
4PIK = "pickle.dat"
5
6data = ["A", "b", "C", "d"]
7with open(PIK, "wb") as f:
8 pickle.dump(data, f)
9
10with open(PIK, "rb") as f:
11 print pickle.load(f)