title: Python, sort a list of dicts by an arbitrary order
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9994317/sorting-list-of-lists-by-a-third-list-of-specified-non-sorted-order">Sorting list of lists by a third list of specified non-sorted order</a>  </p>
  </blockquote>
  
  
  
  <pre><code>a = [{'id':1}, {'id':2}, {'id':3}]
  b = [2,1,3]
  </code></pre>
  
  <p>What would be a good method to sort <code>dict</code> a by <code>list</code> b via the <code>id</code> property. </p>
  
  <p>The result should look something like this</p>
  
  <pre><code>[{'id':2}, {'id':1}, {'id':3}]
  </code></pre>