Sort a list of Python objects by an object attribute

preview_player
Показать описание
In modern python use the operator modules attrgetter as the key in a sort operation to sort objects by an attribute.
Рекомендации по теме