title: Python: Iterate alphabetically over OrderedDict
body: <p>In a script I have an OrderedDict <code>groups</code> that gets fed key/value pairs alphabetically. </p>
  
  <p>In another part of the script, I'm checking against files that have the same same as <code>key</code>  like so:</p>
  
  <pre><code>for (key, value) in groups.items():        
      file = open(key, 'r') 
      # do stuff
  </code></pre>
  
  <p>Stuff happens just fine, part of which is printing a status line for each file, but how can I get Python to iterate through <code>groups</code> alphabetically, or at least numerically as they are ordered (since they are being entered in alphabetical order anyways)? </p>