python dict的保存方法 [dict_saving]


numpy保存

if os.path.exists('map_mcdict.npy'):
    map_dict=np.load('map_mcdict.npy',allow_pickle=True).item()
else:
    map_dict=dict()
====   operation start ====
====   operation end   ====
np.save('map_mcdict.npy',map_dict)


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM