Words to CSV
Completed
Read a line of words separated by spaces (possibly several spaces) and print them joined by commas.
Input
One line.
Output
The words joined with ,
Example
Input
red green blue
Output
red,green,blue
Editor
Python
Hints
split() with no argument splits on any run of whitespace.
separator.join(list) glues a list of strings together.
Solution explanation
split() and join() are opposites. Note that join is called on the separator string.
Show solution
print(",".join(input().split()))