How to sort a Python dictionary by value?
Answers
Answered by
0
Answer:-
I have a dictionary of values read from two fields in a database: a string field and a numeric field. The string field is unique,so that is the key of the dictionary.
Hope it's helps!!
Thanks ✌️✌️
Answered by
0
Answer:
use this method-
import operator
sorted(dict,key = operator.itemgetter(1))
Similar questions