title: sort dict by value python
body: <p>Assume that I have a dict.</p>
  
  <pre><code>data = {1:'b', 2:'a'}
  </code></pre>
  
  <p>And I want to sort data by 'b' and 'a' so I get the result</p>
  
  <pre><code>'a','b'
  </code></pre>
  
  <p>How do I do that?<br>
  Any ideas?</p>