我很抱歉,但我有不明白的問題...Python的預期誤塊
def login_screen():
print(30 * "-")
print(" LOGIN")
print(30 * "-")
username = print("Please enter your username: ")
password = print("Please enter your password: ")
with open('logins.txt', 'r') as csvfile:
loginreader = csv.reader(csvfile, delimiter=',', quotechar= None)
for codes in loginreader:
if len(codes) == L_LEN:
if codes[L_USERNAME] == username and codes[L_PASSWORD] == password and codes[L_ADMIN] == "Yes":
admin_console()
elif username == row[L_USERNAME] and password == row[PASSWORD] and row[L_ADMIN] == "No":
#Temp normal console here
else:
clearscreen()
error_head()
print("Unknown account")
input("Press [ENTER] To continue...")
login_screen()
elif len(codes) != M_LEN:
next(csvfile, None)
所以問題是,它配備了以下錯誤:
File "G:\Python\DatabaseStandardRewrite\Login.py", line 49
else:
^
IndentationError:預計一個縮進塊
但我不明白! (是的,所有其他的事情都是在文檔的其餘部分定義
請問你們誰看到我的錯誤
納坦
我在我的代碼,而不是在這個網站? –
那麼它可能TAB /空間混淆。將製表符轉換爲空格並檢查輸出。 –
我該怎麼做(是的,我是Python新手) –