小编use*_*823的帖子

获取字典列表的最大键

如果我有:

dicts = [{'a': 4,'b': 7,'c': 9}, 
         {'a': 2,'b': 1,'c': 10}, 
         {'a': 11,'b': 3,'c': 2}]
Run Code Online (Sandbox Code Playgroud)

我怎样才能获得最大键,如下所示:

{'a': 11,'c': 10,'b': 7}
Run Code Online (Sandbox Code Playgroud)

python dictionary list

4
推荐指数
2
解决办法
431
查看次数

标签 统计

dictionary ×1

list ×1

python ×1