python OrderDict # encoding: utf-8import csvimport collectionsd = {'banana':3,'apple':4,'pear':1,'orange':2}print(d)kd = collections.OrderedDict(sorted(d.items(),key = lambda t:t[0]))print('key or... python 2023-10-28 55 点赞 0 评论 83 浏览