title: Sorting a dictionary in python
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/613183/python-sort-a-dictionary-by-value">Python: Sort a dictionary by value</a>  </p>
  </blockquote>
  
  
  
  <p>I need to sort by values a original dictionary on a descending order.<br>
  As <strong>keys</strong> I have numbers and as <strong>values</strong> I have some date and time (string).<br><br>
  This means I have:</p>
  
  <pre><code>{1: '2011-09-25 16:28:18', 2: '2011-09-25 16:28:19', 3: '2011-09-25 16:28:13', 4: '2011-09-25 16:28:25'}
  </code></pre>
  
  <p>And I want to have:</p>
  
  <pre><code>{4: '2011-09-25 16:28:25', 2: '2011-09-25 16:28:19', 1: '2011-09-25 16:28:18', 3: '2011-09-25 16:28:13'}
  </code></pre>
  
  <p>Please, look at the times (value). I want to sort the times on a descending order. This means, the most recent time first.</p>
  
  <p>Thanks in advance!</p>