Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sort tuple list python

# To have largest first and smalest last
sorted([('abc', 121),('abc', 231),('abc', 148), ('abc',221)], key=lambda x: x[1], reverse=True)
 
PREVIOUS NEXT
Tagged: #sort #tuple #list #python
ADD COMMENT
Topic
Name
8+7 =