Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Python Basics (2015) Logic in Python Loop

need help am stuck

help please

loop.py
hellos = [
    "Hello",
    "Tungjatjeta",
    "Grüßgott",
    "Вiтаю",
    "dobrý den",
    "hyvää päivää",
    "你好",
    "早上好"
]
for word in hellos:
    print word +

4 Answers

Shreyas Papinwar
Shreyas Papinwar
2,371 Points

hey,

just remove the + sign

and change the print too -

print(word)
Robert Stefanic
Robert Stefanic
35,170 Points

If you remove the "+" sign at the end of your print statement in your loop, and then wrap the "word" variable in parentheses, then your loop will work.

If you're still having trouble, let me know what your error is.

Hi You will also need to add "World" like this

====== for word in hellos: print("{} World".format(word)) ==================

Mehmed Erkekli
Mehmed Erkekli
510 Points

Damn, I got this one logically correct. My format was off (forgot to add colon)