for 循环中的缩进问题
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”,请问是什么原因?