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

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

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