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

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

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