I have a dictionary like prob = {('be', 'limited'): 0.004, ('the', 'book'): 0.000432, ......}
for sorting I used
for k, v in sorted(prob, key = lambda x: x[1], reverse = True):
print k, v
but it doesn't give the result. ( it just gave me the tuples..) I wanna sort that dictionary according to value.