title: How to sort a dictionary by key?
body: <p>i tried to sort dict by key but no chance.
  this is my dict :</p>
  
  <pre><code>result={'1':'value1','2':'value2',...}
  </code></pre>
  
  <p>i'm using Python2.7 and i found this </p>
  
  <pre><code>keys = result.keys()
  keys.sort()
  </code></pre>
  
  <p>but this is not what i expected, i have an unsorted dict.</p>