What is the best way to sort a list of floats by their value, whiles still keeping record of the initial order.
I.e. sorting a:
a=[2.3, 1.23, 3.4, 0.4]
returns something like
a_sorted = [0.4, 1.23, 2.3, 3.4]
a_order = [4, 2, 1, 3]
If you catch my drift.