By: Editorial Staff | Last Updated:
Today we are going to share a Python program to sort words in alphabetic order. If you are a python beginner and want to start learning the python programming, then keep your close attention in this tutorial as I am going to share a Program to find the factors of a number.
To increase your Python knowledge, practice all Python programs, here is a collection of 100+ Python problems with solutions.
Copy the below python program and execute it with the help of python compiler.
# change this value for a different result
my_str = "Hello this Is an Example With cased letters"
# uncomment to take input from the user
#my_str = input("Enter a string: ")
# breakdown the string into a list of words
words = my_str.split()
# sort the list
# display the sorted words
print("The sorted words are:")
for word in words:
The sorted words are:
Editorial Staff at FreeWebMentor is a team of professional developers leads by Prem Tiwari View all posts by Editorial Staff