0
589views
Write a Python Program to Sort Words in Alphabetic Order
1 Answer
| written 3.6 years ago by |
Explanation:-
In this program, we store the string to be sorted in my_str. Using the split() method the string is converted into a list of words. The split() method splits the string at whitespaces.
The list of words is then sorted using the sort() method and all the words are …