+ 3
words = ["hello", "world", "spam", "eggs"] for word in words: print(word + "!")
i dont understand this code
1 Answer
+ 7
Maybe you'll understand it if you read it like a sentence:
Create a list of words that contains hello, world, spam, and eggs.
for each word in the list of words:
output the word and add an exclamation mark at the end
Hope that helps.