Computer Science, asked by jaisleengrewal2874, 11 months ago

How to sort a Python dictionary by value?

Answers

Answered by Anonymous
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 Ichiro77
0

Answer:

use this method-

import operator

sorted(dict,key = operator.itemgetter(1))

Similar questions