Answers for "python argsort a list"

0

python argsort a list

a=list((1, 2, 3, -20))
sorted(range(len(a)), key=a.__getitem__)

output:
[3, 0, 1, 2]
Posted by: Guest on October-15-2020

Python Answers by Framework

Browse Popular Code Answers by Language