title: How to sort a Python dictionary by value?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/72899/in-python-how-do-i-sort-a-list-of-dictionaries-by-values-of-the-dictionary">In Python how do I sort a list of dictionaries by values of the dictionary?</a><br>
    <a href="https://stackoverflow.com/questions/11753660/sorting-python-dictionary-based-on-nested-dictionary-values">Sorting Python dictionary based on nested dictionary values</a>  </p>
  </blockquote>
  
  
  
  <p>I have dictionary of the form as mentioned below:</p>
  
  <pre><code>a_dict = { 'e': (1, 100), 'a': (2, 3) }
  </code></pre>
  
  <p>I am unable to sort it by the second element of the tuple. The resultant dictionary will appear as below:</p>
  
  <pre><code>a_dict = { 'a': (2, 3), 'e': (1, 100) }
  </code></pre>