What is the difference between dict.items() and dict.iteritems() in Python2?

后端 未结 10 754
天命终不由人
天命终不由人 2020-11-22 08:10

Are there any applicable differences between dict.items() and dict.iteritems()?

From the Python docs:

dict.items(): Return a

10条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 08:28

    dict.iteritems() in python 2 is equivalent to dict.items() in python 3.

提交回复
热议问题