📌  相关文章
📜  AttributeError: 'dict' 对象没有属性 'iteritems' - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:56.136000             🧑  作者: Mango

代码示例1
As you are in python3 , use dict.items() instead of dict.iteritems()
iteritems() was removed in python3, so you can't use this method 
anymore. Take a look at Python 3.0 Wiki Built-in Changes section, 
where it is stated:

Removed dict.iteritems(), dict.iterkeys(), and dict.itervalues().

Instead: use dict.items(), dict.keys(), dict.values() respectively.