Search
 
SCRIPT & CODE EXAMPLE
 

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
Comment

PREVIOUS NEXT
Code Example
Python :: how to find no of times a elements in list python 
Python :: install nltk in python 
Python :: python print user input 
Python :: python deque 
Python :: sort dictionary 
Python :: mean of torch tensor 
Python :: pandas shift columns down until value 
Python :: how to print hello world 
Python :: python live video streaming flask 
Python :: how to make sun as first day in calendar python 
Python :: python program running time 
Python :: python font family list 
Python :: np shuffle 
Python :: how to create a new virtualenv 
Python :: swapping array location in python 
Python :: python limit float to 2 decimal places 
Python :: python random real 
Python :: What happens when you use the built-in function any() on a list? 
Python :: how to convert img to gray python 
Python :: pandas save one row 
Python :: python datetime no milliseconds 
Python :: flask get ip of user 
Python :: python find index of minimum in list 
Python :: python dataframe remove header 
Python :: equal sides of an array python 
Python :: python getter decorator 
Python :: pandas replce none with nan 
Python :: python selenium set attribute of element 
Python :: python web parser 
Python :: how to add element at first position in array python 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =