Answers for "python how to sort a list alphabetically"

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 "python how to sort a list alphabetically"

Python Answers by Framework

Browse Popular Code Answers by Language