Sort the list that contains the dict

from operator import itemgetter sorted_list = sorted(list, key=itemgetter('key'), reverse=True)

It is convenient to be able to specify ascending and descending order by specifying reverse.

Recommended Posts

Sort the list that contains the dict
[Python] Sort the list of pathlib.Path in natural sort
A note on customizing the dict list class
[Memo] Python3 list sort
[Python] How to sort dict in list and instance in list
Sort and output the elements in the list as elements and multiples in Python.
Extract the value of dict or list as a string
Extract the Azure service list
Sort by dict type value value
Python basic dict sort order
Methods available in the list
The pip list never ends.
pandas Fetch the name of a column that contains a specific character
Determine if all list elements are present in the dict key
[Python] A program that rotates the contents of the list to the left