Adding characters to strings
-
Horrible at math (and probably Python) but trying to make a function that takes a word and adds an asterisk in between the letters. Trying with a 3 letter word, but the formula should handle any size word you give it.
Here’s what I have:word=str(input('Give me a word: ')) def starry_eyes(str): while word == (''): return ([],'*',[],'*',[]) ```
-
word = 'python' print('*'.join(word))