Question: program that takes in a string and outputs the input string transformed so that a space character is added between each two of its (consecutive)

program that takes in a string and outputs the input string transformed so that a space character is added between each two of its (consecutive) characters.

Ex: If the input is 'Wonderful!', the output is:

W o n d e r f u l ! 

Note: there is a space character at the end of the result string, too.

program must define and call the function AddSpaces whose input is a string, and which returns a string built as described above:

def AddSpaces(inputString):

no idea how this is done please help

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!