例如,我有:
>>>a = {'dog': [('cute', 10, 20)], 'cat': [('nice', 12, 11)], 'fish':[('hate', 1, 3)]}
期望返回,'dog'因为索引1和2处的整数之和为30,这大于cat和fish的整数之和.
'dog'
如果我不使用import,有没有简单的方法呢?
python dictionary tuples list
dictionary ×1
list ×1
python ×1
tuples ×1