Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Nicholas Anstis
2,095 PointsI need you to write a for loop that goes through each of the words in hellos and prints each word plus the word "World".
I don't know what do to do. :P
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for hellos in world:
print(hellos + world)
world = world
3 Answers

Haider Ali
Python Development Techdegree Graduate 24,724 PointsHi Nicholas, you have the basic idea right, only there are a couple of places where you are going wrong. Firstly, you should be looping through the list hellos
. For each greeting in hellos you should print that greeting plus " World"
. You have forgotten your quote marks around 'world' which makes the challenge think you are attempting to print a variable called world
whereas this is not the case. Lastly, the challenge doesn't ask you to define a variable called world so if you leave that out your code should look like this;
for greeting in hellos:
print(greeting + " World")
If you have any further questions please leave a comment :)
Thanks,
Haider

Omar Richardson
3,452 PointsDoes anyone see an issue with my code?
I am getting an error when trying to validate the code
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for hello in hellos:
print(hello + "World")

Haider Ali
Python Development Techdegree Graduate 24,724 PointsAt the beginning of the "World"
string you need a space otherwise the words will be right next to each other like this:
HelloWorld

Ronnie Jimenez
Courses Plus Student 2,345 PointsThis code worked for me.
hellos = [
"Hello",
"Tungjatjeta",
"Grüßgott",
"Вiтаю",
"dobrý den",
"hyvää päivää",
"你好",
"早上好"
]
for hello in hellos:
print(hello + " World")
Nicholas Anstis
2,095 PointsNicholas Anstis
2,095 PointsThank you! That was of great help :D