python 根据字典的键值进行排序的方法 1、利用key排序d={'d1':2,'d2':4,'d4':1,'d3':3,}forkinsorted(d):print(k,d[k])d12d24d33d412、利用value排序:__ge python根据字典值排序