标签: python python-2.7 sorting dictionary
I have a dictionary with integers for both keys and values
d = {25:5, 12:45, 34:5, 19:5, 209:3, 12:7, 1:999, 999:1}
Is there a method to return
>>> print d {999:1, 209:3, 19:5, 25:5, 34:5, 12:7, 12:45, 1,999}