Word Sort


Write a program to sort the words in the sentence in alphabetic order Input:A Sentence Output: Display the words of a sentence in sorted order Refer sample input and output for formatting specification. Test Case 1 Input (stdin) Hello this Is an Example With cased letters Expected Output The sorted words are Example Hello Is With an cased letters this Test Case 2 Input (stdin) This program returns the words in sorted order Expected Output The sorted words are This in order program returns sorted the words

Program :

my_str = input()

words = my_str.split()  


print("The sorted words are")

for word in words: