python:IndentationError:expected an indented block錯誤

學文本進度條時,因爲在IDLE中"\r"不可用,所以到cmd中模擬。 報錯「IndentationError: expected an indented block」 發現原因是沒有縮進。。。我還以爲那個省略號就是縮進呢。。。 Python語言對縮進太敏感了,以後記住: 遇到:if, def, for xxx 該縮就縮!
相關文章
相關標籤/搜索