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

Justin Ricke
PLUS
Justin Ricke
Courses Plus Student 345 Points

Problems with not finding hellos...

My My code is below for some reason I am not finding any hellos: for word in hellos, also I am a little unsure of the concatenation? print(word + "World")

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

for word in hellos: print(word + ' World')

leave a space before World

2 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Evan is correct. You're missing a space. Your current code will print out "HelloWorld". Not "Hello World". Did I mention challenges are picky? :)

Justin Ricke
PLUS
Justin Ricke
Courses Plus Student 345 Points

Yea I should have read through the previous questions I saw that someone else asked the same question, thasnk again for your response.

Jennifer Nordell
seal-mask
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

You're welcome! Getting to know your way around these forums is a bit tricky at first, but they sure are nice when you're stuck :)