I have a list of lists:
x = [[1,2,3], [4,5,6], [7,8,9], [2,2,0]]
I want to get the list whose sum of its elements is the greatest in the list. In this case [7,8,9]
.
I'd rather have a fancy map
or lambda
or list comprehension method than a for/while/if
loop.
Best Regards