Question: In Python D. Write a function called space() that takes a string and returns a string with the same characters, each separated by a space.
D. Write a function called space() that takes a string and returns a string with the same characters, each separated by a space. So space ("foobar") should return "f o ob a r". Note that it should not put a space at the beginning or end of the string. (Hint: You'll probably want to use a for loop to go through the string, and you'll build up your output returned string letter by letter.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
