You can use the python sorting functions’ key
parameter to sort the index array instead.
>>> s = [2, 3, 1, 4, 5, 3]
>>> sorted(range(len(s)), key=lambda k: s[k])
[2, 0, 1, 5, 3, 4]
>>>
More Related Contents:
- PYTHON is UNFAIR. Its treating list and a non list variable with partiality
- code that check if number is prime number [duplicate]
- selenium in python : NoSuchElementException: Message: no such element: Unable to locate element
- How to find the mime type of a file in python?
- Hiding axis text in matplotlib plots
- Python 3: ImportError “No Module named Setuptools”
- How does functools partial do what it does?
- Python Window Activation
- How do I create a datetime in Python from milliseconds?
- What’s the best way to find the inverse of datetime.isocalendar()?
- Python: call a function from string name [duplicate]
- link several Popen commands with pipes
- Login dialog PyQt
- How to input matrix (2D list) in Python?
- How to sum all the values in a dictionary?
- setup.py and adding file to /bin/
- Get output from a Paramiko SSH exec_command continuously
- Conda command not found
- User Registration with error: no such table: auth_user
- Print out Python console output to Qtextedit
- regexes: How to access multiple matches of a group? [duplicate]
- How to scrape only visible webpage text with BeautifulSoup?
- Get the nth element from the inner list of a list of lists in Python [duplicate]
- Python – Get path of root project structure
- What should I put in the body of an abstract method?
- Run command with PyQt5 and getting the stdout and stderr
- creating an alias for python3
- How to use `cv2.imshow` correctly for the float image returned by `cv2.distanceTransform`?
- In what case would I use a tuple as a dictionary key? [closed]
- Selenium + Python: How to stop page loading when certain element gets loaded?