我只是遵循python的基本原理,并且一直在使用IDLE,因为我发现实时测试脚本非常方便。关于Python IDLE的缩进错误
尽管我可以在没有问题的情况下运行此脚本作为文件,但我不能在IDLE!中包含最后一条打印语句!我尝试了一个缩进,4个空格,没有缩进。请解释我做错了什么。
while True:
print ('Who are you?')
name = input()
if name != 'Joe':
continue
print('Hello, Joe. What is the password? (It is a fish.)')
password = input()
if password == 'swordfish':
break
print('value')
SyntaxError: invalid syntax
我以为是这样。感谢大家的帮助。 – user2212485
你能接受答案来结束答案吗? –