title: In Python, how do I iterate over a dictionary in sorted key order?
body: <p>There's an existing function that ends in the following, where <code>d</code> is a dictionary:</p>
  
  <pre><code>return d.iteritems()
  </code></pre>
  
  <p>that returns an unsorted iterator for a given dictionary. I would like to return an iterator that goes through the items sorted <em>by key</em>. How do I do that?</p>