← Back to challenges

Spaces Between Each Character

PythonMediumstringsformattinglanguage_fundamentalsarrays

Instructions

Create a function that takes a string and returns a string with spaces in between all of the characters.

Examples

space_me_out("space") ➞ "s p a c e"

space_me_out("far out") ➞ "f a r   o u t"

space_me_out("elongated musk") ➞ "e l o n g a t e d   m u s k"

Notes

Treat a space as its own character (i.e. leave three spaces between words).

python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Multiply Every List Item by Two