会员
周边
新闻
博问
闪存
众包
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
智、心
博客园
首页
新随笔
联系
订阅
管理
06 2020 档案
dict遍历的时候删除dict中的值报错RuntimeError: dictionary changed size during iteration
摘要:遇到的error,当遍历字典的时候修改字典数据会报错,例如 temp = {'name': 'Mike', 'age': '25', 'shengao': 180, 'weight': 80} for key,value in temp.items(): del temp[key] #Runtime
阅读全文
posted @
2020-06-25 18:48
智、心
阅读(232)
评论(0)
推荐(0)
公告