This short Python tutorial shows how to sort integer and string lists in Python. A list is created as: example_list = [c, a, b] and can be sorted with following commands:
- sorted(example_list)
- example_list.sort()
To start with the biggest number or letter in the alphabet, we can use the argument; reverse=True within the sorted() function. To sort the letters regardless of lower- & uppercase, we can specify the key=str.lower within the sorted() function.
Many thanks for watching!
На этой странице сайта вы можете посмотреть видео онлайн Sorting integer and string lists in Python длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь ExplainHowToSimply 17 Октябрь 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 1,132 раз и оно понравилось 10 зрителям. Приятного просмотра!