Skip to content

Commit cbd4537

Browse files
authored
Update word-sorting.py
1 parent 057b79e commit cbd4537

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Week 11/word-sorting.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
1+
Write a program that accepts a comma-separated sequence of words as input and prints the words in a comma-separated sequence after sorting them alphabetically.
12

3+
Input Format:
4+
The first line of input contains words separated by the comma.
5+
6+
Output Format:
7+
Print the sorted words separated by the comma.
8+
9+
Example:
10+
11+
Input:
12+
without,hello,bag,world
13+
14+
Output:
15+
bag,hello,without,world
216

317

418
l=input().split(',')

0 commit comments

Comments
 (0)