python-有序字典、默認字典、雙向隊列、隊列

#有序字典 import collections od = collections.OrderedDict() od['k1'] = 'v1' od['k2'] = 'v2' od['k3'] = 'v3' print(od.items()) # odict_items([('k1', 'v1'), ('k2', 'v2'), ('k3', 'v3')]) od.move_to_end('k2')
相關文章
相關標籤/搜索