EADST

Python: Save and Load Pickle File

Python: Save and Load Pickle File.

import pickle

save_dict = {'id': 110}

with open('save_path_here.pickle', 'wb') as handle:
    pickle.dump(save_dict, handle, protocol=pickle.HIGHEST_PROTOCOL)

with open('save_path_here.pickle', 'rb') as handle:
    load_dict = pickle.load(handle)

print(save_dict== load_dict)

Reference

stackoverflow

相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
站点统计

本站现有博文266篇,共被浏览440675

本站已经建立2019天!

热门文章
文章归档
回到顶部