nums = {'a':3, 'b':5, 'c':16, 'z':235, 'y':10}
for key, val in sorted(nums.items(), key = lambda nums: nums[1], reverse = True):
print key, str(val)
Result
z 235
c 16
y 10
b 5
a 3
nums = {'a':3, 'b':5, 'c':16, 'z':235, 'y':10}
for key, val in sorted(nums.items(), key = lambda nums: nums[1], reverse = True):
print key, str(val)
z 235
c 16
y 10
b 5
a 3