I have a list of dictionaries and want each item to be sorted by a specific value.
Take into consideration the list:
[{\'name\':\'Homer\', \'age\':39},
You may also use to sort by second element (x[1]) of dct_name.items() and call the dict() constructor to get it as a dictionary
sorted_dct = dict(sorted(dct_name.items(), key = lambda x : x[1]))