Run
dict1 = { "key1": 56, "key2": 10, "key3": 12, "key4": 7} sorted_dict = dict(sorted(dict1.items(), key=lambda item: item[1])) print(sorted_dict)
Output