Skip to content

Latest commit

 

History

History

string-split-and-join

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

String Split and Join

https://www.hackerrank.com/challenges/python-string-split-and-join

Problem

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

My Solution