Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sorted python

arr = [(3,2), (1,2), (0,4), (9,7)]
k = lambda x : x[0] #key, optional
rev = False # reverse, optional 
sorted(arr, key=key, reverse=reverse)
 
PREVIOUS NEXT
Tagged: #sorted #python
ADD COMMENT
Topic
Name
6+7 =