Answers for "python sort list by alphabetical order"

1

python alphabetical order

my_str = "you can just put in word in one sentence like this"
my_str = input("Enter a string: ")
words = [word.lower() for word in my_str.split()]
words.sort()
print("The sorted words are:")
for word in words:
   print(word)
Posted by: Guest on November-18-2021

Code answers related to "python sort list by alphabetical order"

Python Answers by Framework

Browse Popular Code Answers by Language