Skip to content

Commit 1e6a0fb

Browse files
authored
added sorting alphabet program👩‍💻
1 parent 41e3118 commit 1e6a0fb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
my_str = input("Enter a string: ")
2+
# breakdown the string into a list of words
3+
words = my_str.split()
4+
# sort the list
5+
words.sort()
6+
# display the sorted words
7+
for word in words:
8+
print(word)

0 commit comments

Comments
 (0)