1.python3.x中移除了cPickle模块,可以使用pickle模块代替.最终我们将会有一个透明高效的模块. 2.因为存储的是对象,必须使用二进制形式写进文件 #!/usr/bin/python # Filename: pickling.py import pickle as p #import pickle as p shoplistfile = 'shoplist.data' # the name of the file where we willl store the object…