title: What's the best way to sort a list while also keeping its original index?
body: <pre><code>l = ['0.40165794', '0.43157488', '0.65739065', '0.5142521']
  </code></pre>
  <p>I want to transform the list into the following form:</p>
  <pre><code> l = [('0.65739065', 2), ('0.5142521', 3), ('0.43157488', 1), ('0.40165794', 0)]
  </code></pre>
  <p>I can first create a dict to store the value-index pair, then sort l in descending order, then for each sorted element, look up the dict to the the index, then compose the list of tuples.</p>
  <p>This seems quite complicated. Is there a better way to do that?</p>