https://www.hackerrank.com/challenges/python-string-split-and-join
In Python, a string can be split on a delimiter.
Task
You are given a string. Split the string on a " " (space) delimiter and join using a - hyphen.
Input Format
The first line contains a string consisting of space separated words.
Output Format
Print the formatted string as explained above.
Sample Input 0
this is a string
Sample Output 0
this-is-a-string