Loading, please wait...

A to Z Full Forms and Acronyms

Program to Sort Words in Alphabetic Order | Python

Mar 13, 2021 Python, 353 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)
A to Z Full Forms and Acronyms

Related Article