Tutorial 4: Sorting Lists of Tuples with Functions of Tuple Elements

preview_player
Показать описание
This video shows how to sort a list by a function of its elements, which in this case are tuples. A function that computes some characteristic of interest about each tuple individually can thus be used to sort the tuples by that characteristic. This feature affords incredible flexibility in sorting lists.

Here is a nice webpage on this topic:

Рекомендации по теме