一条小鱼干

导航

07 2021 档案

python有序字典和字典排序
摘要:1.python2.x有序字典 import collections # 创建一个有序字典 datas = collections.OrderedDict() python3.x默认是有序字典 2.字典排序 e = {'a': 5, 'd': 3, 'c': 1, 'e': 2, 'b': 4} 以 阅读全文

posted @ 2021-07-05 18:50 一条小鱼干 阅读(327) 评论(0) 推荐(0)