python2和python3的区别 1.字典的迭代 for k,v in d1.items(): python 2 中是无序的 python 3 中是有序的 在python 2 中实现字典的有序迭代: from collections import OrderedDict d = OrderedDict() d['a'] = 1 d['b'] = 2 d['c'