you的日常

关注

Python字典排序

you的日常

关注

阅读 43

2023-09-26


dict1 = {'a': 5, 'b': 3, 'c': 6}
sorted_dict = dict(sorted(dict1.items(), key=lambda x: x[1]))
print(sorted_dict)


相关推荐

南陵王梁枫

python 字典排序

南陵王梁枫 78 0 0

Aliven888

Python有序字典以及字典排序

Aliven888 165 0 0

后来的六六

python - 列表,字典的排序

后来的六六 117 0 0

残北

python列表里的字典排序

残北 18 0 0

乐百川

Python编程:字典排序sorted问题

乐百川 124 0 0

读思意行

Python小记——初始化字典序列,字典排序和字典推导

读思意行 56 0 0

快乐小鱼儿_9911

字典排序permutation

快乐小鱼儿_9911 121 0 0

回溯

对字典排序

回溯 21 0 0

梦想家们

Python面试题目之字典排序

梦想家们 89 0 0

河南妞

python - sort - 对象、数组、字典 lambda 排序方法

河南妞 175 0 0

精彩评论(0)

0 0 举报