Letter-spacing

Report a typo

Let's do some text formatting. Read an input word and print it with an indicated number of spaces between the letters. There are two different inputs: a word in the first line and a number of spaces in the second line.

Tip: Note that unpacking works for strings as well. And to get the exact number of spaces, multiply the string by that number: ' ' * number_of_spaces

Sample Input 1:

earnest
1

Sample Output 1:

e a r n e s t

Sample Input 2:

Ernest
2

Sample Output 2:

E  r  n  e  s  t
Write a program in Python 3





___

Create a free account to access the full topic