194. How to Sort Words in Alphabetical Order in Python with Code || Python Loop, Strings and Methods

194. How to Sort Words in Alphabetical Order in Python with Code || Python Loop, Strings and Methods

Split method link:    • 137. String Rindex and Split Method in Pyt...   Lower method link:    • 131. String Lower and Rjust Method in Pyth...   Code: my_str='Permutation means arrangement and combination means selection of objects' #my_str=input("Enter a string:") words=[word.lower() for word in my_str.split()] words.sort() print("The sorted words are:") for word in words: print(word)