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

I didn't understand what I have done wrong !

The error says: Didn't find all the "Hello"s.

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

2 Answers

Stuart Wright
Stuart Wright
41,118 Points

The error message it's giving you isn't very helpful. I think the problem is actually that you are currently printing out hello and world without a space between them. I think either of the below solutions will work:

for hello in hellos:
    print(hello, "World")
for hello in hellos:
    print(hello + " World")

Thank You very much Sir

Robert Bryan
Robert Bryan
2,869 Points

Same problem I was having, just needed to add a space. thanks...