Possible Duplicate:
Python: Sort a dictionary by value
I need to sort by values a original dictionary on a descending order.
As keys I have numbers and as values I have some date and time (string).
This means I have:
{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'}
And I want to have:
{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'}
Please, look at the times (value). I want to sort the times on a descending order. This means, the most recent time first.
Thanks in advance!