Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python max value of list of tuples

In [53]: lis=[(101, 153), (255, 827), (361, 961)]

In [81]: from operator import itemgetter

In [82]: max(lis,key=itemgetter(1))[0]    #faster solution
Out[82]: 361
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #max #list #tuples
ADD COMMENT
Topic
Name
4+7 =