words = ["hello", "world", "spam", "eggs"] for word in words: print(word + "!") 结果: >>> hello! world! spam! eggs! >>>
2