最值问题
max(defaultdict) 为 该字典 最大 键
max(defaultdict,key=lambda x:defaultdict[x]]) 是 值 最大的键值对
加进 defaultdict 里就是 值 最大的 键 了
排序问题
(懒得写了 忘了 就去 朱庇特 里面 搜到 下面的位置
dict(sorted(a.items(),key=lambda x :x[1],reverse= True))
最值问题
max(defaultdict) 为 该字典 最大 键
max(defaultdict,key=lambda x:defaultdict[x]]) 是 值 最大的键值对
加进 defaultdict 里就是 值 最大的 键 了
排序问题
(懒得写了 忘了 就去 朱庇特 里面 搜到 下面的位置
dict(sorted(a.items(),key=lambda x :x[1],reverse= True))