我只是遵循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
你能接受答案來結束答案嗎? –