-7
我有錯誤,說「IndentationError:unindent不匹配任何外部縮進級別」,我已嘗試使用命令並更改空間和選項卡,但仍然錯誤繼續出現,並且我已嘗試所有我已經閱讀論壇上,但仍出現在同一部位錯誤,請幫忙 誤差部分: bullets.update() ^ 代碼:Identation Error
def update_bullets(bullets):
"""Update position of bullets and gets rid of old bullets"""
#Update bullet position
bullets.update()
# Get rid of bullets that had dissapeared
for bullet in bullets.copy():
if bullet.rect.bottom <= 1:
bullets.remove(bullet)
print(len(bullets))
python中的縮進將在任何教程中介紹。 – Julien
在Python中,空白是相關的。你的縮進遍佈整個地方,而這絕不會奏效。您可以在http://python.org找到Python教程 –
縮進的作用幾乎肯定是任何Python教科書或教程中的第一課。如何在不知情的情況下學習語言? – Barmar