7. Enumeration
by CodeChum Admin
Have you ever answered a test question that tells you to enumerate a series of things, but the answer must be in a sentence? Quite tiring to write those things separated by commas and a single space, isn't it?
Then let's try coding it instead!
Input
Five lines containing a string on each.
C
C#
Java
Python
Javascript
Output
A single line containing all the strings separated by a comma and a space.
C, C#, Java, Python, Javascript
list = []
for i in range(5):
list.append(input())
print(', '.join(list))
Comments
Leave a comment