摘要: >>> import cPickle as pickle >>> t1 = ('this is a string', 42, [1, 2, 3], None) >>> t1 ('this is a string', 42, [1, 2, 3], None) >> 阅读全文
posted @ 2017-01-21 21:34 HelloSUN 阅读(2219) 评论(0) 推荐(0) 编辑
摘要: python的pickle模块实现了基本的数据序列和反序列化。通过pickle模块的序列化操作我们能够将程序中运行的对象信息保存到文件中去,永久存储;通过pickle模块的反序列化操作,我们能够从文件中创建上一次程序保存的对象。 基本接口: pickle.dump(obj, file, [,prot 阅读全文
posted @ 2017-01-21 21:33 HelloSUN 阅读(281) 评论(0) 推荐(0) 编辑