Sort Lists - Python Tutorial - w3Schools - Ch#24 English

Publicado em: 06 Agosto 2022
no canal de: w3Schools Tutorials
138
4

Sort List Alphanumerically
List objects have a sort() method that will sort the list alphanumerically, ascending, by default.
Sort Descending
To sort descending, use the keyword argument reverse = True.
Customize Sort Function
You can also customize your own function by using the keyword argument key = function.

The function will return a number that will be used to sort the list (the lowest number first).
Case Insensitive Sort
By default the sort() method is case sensitive, resulting in all capital letters being sorted before lower case letters.
Reverse Order
What if you want to reverse the order of a list, regardless of the alphabet?

The reverse() method reverses the current sorting order of the elements.


Nesta página do site você pode assistir ao vídeo on-line Sort Lists - Python Tutorial - w3Schools - Ch#24 English duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário w3Schools Tutorials 06 Agosto 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 138 vezes e gostou 4 espectadores. Boa visualização!