如何python循环中删除字典元素

//下面这行就是在循环中遍历删除字典元素的方法!


for i in list(dictheme2.keys()):
if dictheme2[i]<self.countFortheme:
dictheme2.pop(i)

posted on 2019-12-18 18:16  张博的博客  阅读(2712)  评论(0编辑  收藏  举报

导航