Loading, please wait...

Program to Sort Words in Alphabetic Order | Python

Mar 13, 2021 Python, 296 Views
Program to Sort Words in Alphabetic Order | Python

Program to Sort Words in Alphabetic Order | Python

my_str = "Hi this is an example. TutorialsLink Community "

words = [word.lower() for word in my_str.split()]

words.sort()

print("Here are the sorted words:")
for word in words:
   print(word)