I apologize beforehand if this has already been covered, but I've been unable to find an answer.
I want a for loop to produce an output with every other letter having a space before it. Should look something like this:
>>>everyOther('banana')
b
a
n
a
n
a
I understand the general concept of for loops and so far I get how:
def everyOther(word):
for each in word:
print each
produces:
w
o
r
d
but I'm not sure how to select which letters would have a space before it.
Any help or directions would be very helpful. ^o^