DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python ordered indexs of a list
>>> s = [2, 3, 1, 4, 5, 3] >>> sorted(range(len(s)), key=lambda k: s[k]) [2, 0, 1, 5, 3, 4] >>>
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#ordered
#indexs
#list
ADD COMMENT
Topic
COMMENT
Name
8+7 =
Submit