FAQ: Learn Python- Loops - For your strings

This community-built FAQ covers the “For your strings” exercise in Codecademy’s lessons on Python.

FAQs for the Codecademy Python exercise For your strings:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources about Python in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account, billing, Pro, or Pro Intensive? Reach out to our support team!

None of the above? Find out where to ask other questions here!

i got my code right and my output shown was way off?

thing = "spam!"

for c in thing:
  print c

word = "eggs!"

# Your code here!
for i in word:
    print i

and output

ps

ma

e!

gg

!s

what went wrong ?

Not able to reproduce the problem…

>>> thing = "spam!"
>>> for c in thing:
	print c

  
s
p
a
m
!
>>> word = "eggs!"
>>> for i in word:
	print i

	
e
g
g
s
!
>>>