Python pickle
存储的过程
import pickle
test_data = ['Save me!', 123.456, True]
f = file('test.data', 'w')
pickle.dump(test_data, f)
f.close()取存储的过程:
f = file('test.data')
test_data = pickle.load(f)
f.close()
print tes
转载
2016-08-08 12:26:20 ·
850 阅读 ·
0 评论