因此,我從Python3腳本中得到了這段代碼片段,這可悲地產生了「預期的縮進塊」錯誤。通常的答案似乎是你要麼縮進錯誤,要麼混合了製表符和空格。我檢查了這兩個,但我的intendation似乎很好,我只使用4個空格縮進,沒有選項卡。 任何人有一個想法什麼是錯的?Python 3中的Intendation錯誤
for submission in submissions:
currentUser = submission.author.name
if currentUser in uniqueUsers:
# Do Nothing
else:
uniqueUsers.append(currentUser)
for user in uniqueUsers:
print(user)
'currentUser not in uniqueUsers'是一個使用雙字'not in'運算符的單個表達式,而不是必須否定'uniqueUser'中'currentUser'的結果。 – chepner