首页 > 其他 > 详细

7——1 shelve 模块

时间:2018-07-01 10:19:54      阅读:196      评论:0      收藏:0      [点我收藏+]
mport shelve

f=shelve.open(r‘sheve.txt‘)
# f[‘stu1_info‘]={‘name‘:‘egon‘,‘age‘:18,‘hobby‘:[‘piao‘,‘smoking‘,‘drinking‘]}
# f[‘stu2_info‘]={‘name‘:‘gangdan‘,‘age‘:53}
# f[‘school_info‘]={‘website‘:‘http://www.pypy.org‘,‘city‘:‘beijing‘}

print(f[‘stu1_info‘][‘hobby‘])
f.close()

7——1 shelve 模块

原文:https://www.cnblogs.com/yikedashuyikexiaocao/p/9249313.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!