📜  按值排序字典 python 3 - Python 代码示例

📅  最后修改于: 2022-03-11 14:47:05.957000             🧑  作者: Mango

代码示例4
from collections import OrderedDict
dd = OrderedDict(sorted(d.items(), key=lambda x: x[1]))
print(dd)