Python

Program to Sort Words in Alphabetic Order | Python

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)
TutorialsLink Curator

This is an official account managed by the team TutorialsLink Community