from collections import OrderedDict od = {'c': 1, 'a': 3, 'b': 5} for key, val in od.items(): print(key, val) is_od = {} OrderedDict(is_od) is_od['c'] = 1 is_od['a'] = 3 is_od['b'] = 5 for key, val in is_od.items(): print(key, val) 结果; a 3 b 5 c 1 ‘------------’ a 3 b 5 c 1