Python Python Basics (2015) Logic in Python Loop

I 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 need you to write a for loop that goes through each of the words in hellos and prints each word plus the word "World". So, for example, the first iteration would print "Hello World".

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

1 Answer

Wade Williams
Wade Williams
24,347 Points

Here's a link that explains it well:

https://wiki.python.org/moin/ForLoop

for greeting in hellos:
    print(greeting, "World")