title: Sorting Python Dictionary based on Key?
body: <p>I have created a python dictionary which has keys in this form :</p>
  
  <pre><code>11, 10, 00, 01, 20, 21, 31, 30
  </code></pre>
  
  <p>The keys are string </p>
  
  <p>I would like to maintain my dictionary in these sorted order:</p>
  
  <pre><code>00, 10, 20, 30, 01, 11, 21, 31 
  </code></pre>
  
  <p>This is based on the second value of the key.</p>
  
  <p>I tried this <code>sorted(dict.items(), key = lambda s: s[1])</code> and got the keys like:</p>
  
  <pre><code>20, 30, 21, 31, 01, 11, 10, 00
  </code></pre>
  
  <p>Can somebody guide me?</p>