Maria Cuevas2,042 Points
for words in hellos: print(hellos + 'World') Bummer! can only concatenate list (not "str") to list
Why does it say that?
hellos = [ "Hello", "Tungjatjeta", "Grüßgott", "Вiтаю", "dobrý den", "hyvää päivää", "你好", "早上好" ] for words in hellos: print(hellos + 'World')
AJ Salmon5,673 Points
The error is being raised because you're trying to concatenate the list
hellos with the string
"World". Instead of printing hellos + " World" you need to print words + " World". When you use a for loop, the first name you give it (example: 'x' in
for x in y) represents each item in the iterable you give it, which is the second object that comes after the 'in'. Also, make sure you include an extra space at the start of your string! You want it to print "Hello World" not "HelloWorld".
Put words instead hellos and add space Before World See as under
for words in hellos: ti = words + " World" print(ti)