Search
 
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
Name
8+7 =