DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
5+1 =
Submit