In Python how do I sort a list of dictionaries by values of the dictionary?
- by masi
I got a list of dictionaries and want that to be sorted by a value of that dictionary.
This
[{'name':'Homer', 'age':39}, {'name':'Bart', 'age':10}]
sorted by name, should become
[{'name':'Bart', 'age':10}, {'name':'Homer', 'age':39}]