I am having trouble in sorting dictionary. I am using the below code to sort them
sorted_x = sorted(x.iteritems(), key=operator.itemgetter(1))
but the problem is the sort is not done by actual values..
asdl 1
testin 42345
alpha 49
Ref: Sorting a dictionary in python
I need the items sorted like below
asdl 1
alpha 49
testin 42345