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

Mo B
PLUS
Mo B
Courses Plus Student 493 Points

Please Help

Hi, I do not get what I'm doing wrong. Please help. Thanks in advance!

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

you have to type

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

btw how did you got PRO icon on the profile pic?

Mo B
Mo B
Courses Plus Student 493 Points

Hi, Thank you ! And regarding your question, you have go to your account settings. You can pay 20$ more I believe to get access to more content. So you'll basically upgrade to pro!

Mo B
Mo B
Courses Plus Student 493 Points

Hi again Aroshine, I tried what you told me to do and it didn't work. Have you forgotten anything by mistake? Thank you again!

2 Answers

Sahil Sharma
Sahil Sharma
4,791 Points

Try putting in a space before the World try print (words + " World")

For treehouse you have to be very specific as spacing does matter in outputs. This should fix your problem.

Wu Ray
Wu Ray
2,359 Points

you are saying it return you with concatenate string? if this is what you are talking about, you can refer to Sahil Sharma's suggestion.

put an " " space in front of your "world". like: print(words + " World")