Hyphenate Letters | Python Program to Print a Hyphen between each letter in the word
You are given a word W as input. Print W by adding a hyphen between each letter in the word.
The first line of input is a string W
In the given example, the word is Hello
So, the output should be H-e-l-I-o
w=input() hypen="-" string="" length=len(w) for i in w: string=string+i+hypen string=string.strip("-") print(string)