![]() |
#2
古1232020-06-22 11:57
|
for animal in animals:
print("A "+animal+" would make a great pet.")
print("A " + animal+ " is so cute.\n")
print("any of these animals would make a great pet.")
SyntaxError: invalid syntax
for循环结束后,想接着输入一条消息,只执行一次,没有缩进,但程序一直报错“invalid syntax”,请问是什么原因?