小编noo*_*cel的帖子

获取字典python中每个键的最大值

我有以下字典,我想输出每个键的最大值:

yo = {'is': [1, 3, 4, 8, 10],
             'at': [3, 10, 15, 7, 9],
             'test': [5, 3, 7, 8, 1],
             'this': [2, 3, 5, 6, 11]}
Run Code Online (Sandbox Code Playgroud)

例如,输出应该是这样的

[10, 15, 8, 11]
or 
['is' 10, 'at' 15, 'test' 8, 'this' 11]
Run Code Online (Sandbox Code Playgroud)

python dictionary key list python-3.x

0
推荐指数
1
解决办法
44
查看次数

标签 统计

dictionary ×1

key ×1

list ×1

python ×1

python-3.x ×1