import pickle
def save_pkl(path,obj):
pickle_file = open(path,'wb')
pickle.dump(obj, pickle_file)
pickle_file.close()
print("保存成功")
def load_pkl(path):
pickle_file = open(path,'rb')
obj=pickle.load(pickle_file)
pickle_file.close()
print("讀取成功")
return obj
a=[1,2,3,4]
save_pkl("./list_a.pkl",a)
僅做個人筆記方便查看
參考:
https://zhuanlan.zhihu.com/p/104492767?from_voters_page=true
項目介紹隨著信息技術和網絡技術的飛速發展,人類已進入全新信息