保持字典的有序性(dict本身是无序的) from collections import OrderedDictd = OrderedDict()d['jim'] = 12d['wim'] = 12d['kan'] = 12d['dem'] = 12for k in d: print(k) Python 2023-10-29 56 点赞 0 评论 84 浏览