Answers for "sort list alphabetically python"

9

sort list alphabetically python

my_list = ['pera', 'apple', 'orange', 'grape']
my_list.sort() # ['apple', 'grape', 'orange', 'pera']
Posted by: Guest on August-28-2020
0

python how to sort a list alphabetically

print(sorted(("snow", "glacier", "iceberg")))
Posted by: Guest on January-09-2020

Code answers related to "sort list alphabetically python"

Python Answers by Framework

Browse Popular Code Answers by Language