Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Sort python list by first element

li = [[1,4,7],[3,6,9],[2,59,8]]
li.sort(key=lambda x: int(x[0]))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Sort #python #list #element
ADD COMMENT
Topic
Name
9+4 =