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

Paul Je
Paul Je
4,435 Points

Still stuck! Please help..

Different variation this time I entered in the value for the variable to plug into the print function instead of declaring it as a string to concatenate with each x in this case, or, hello. I tried the 'for hello in hellos' and this variation but neither seem to work and the console is telling me that it cannot find each hello in hellos... please help!

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


new_additional_werds = "World"
for x in hellos:  
    print(x + new_additional_werds)
Jesus Mendoza
Jesus Mendoza
23,289 Points

Hey Paul. I replicated your code and it worked fine, the only problem that I encountered was that Python couldn't convert the symbols of each language and print them

3 Answers

Stephan Olsen
Stephan Olsen
6,650 Points

Replace the plus symbol with a comma and it should work.

Paul Je
Paul Je
4,435 Points

Thanks guys! Tech issues happen every minute for me it feels like

Jesus Mendoza
Jesus Mendoza
23,289 Points

Don't worry it happens to everyone of us and especially when we are first learning.

Paul Je
Paul Je
4,435 Points

Appreciate you