Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python sort a list using defined order

>>> sorted(A, key = lambda i: B.index(i[0]))
[[6, 1], [1, 3], [3, 5]]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #sort #list #defined #order
ADD COMMENT
Topic
Name
1+8 =