Pickle
存储对象
import pickle
dic = {'da': 111, 'please': 2}
file = open('pick', 'wb')
pickle.dump(dic, file)
file.close()
读取对象
import pickle
file = open('pick', 'rb')
dic = pickle.load(file)
print(dic)
import pickle
dic = {'da': 111, 'please': 2}
file = open('pick', 'wb')
pickle.dump(dic, file)
file.close()
import pickle
file = open('pick', 'rb')
dic = pickle.load(file)
print(dic)