2018-10-17
閱讀量:
2472
expected an indented block報(bào)錯(cuò)
Python語言是一款對(duì)縮進(jìn)非常敏感的語言,最常見的情況是tab和空格的混用會(huì)導(dǎo)致錯(cuò)誤,或者縮進(jìn)不對(duì)。
s = 200
if s >=0:
print s
File "<ipython-input-1-3bc7501862e5>", line 3
print s
^
IndentationError: expected an indented block
在編譯時(shí)會(huì)出現(xiàn)這樣的錯(cuò)IndentationError:expected an indented block說明此處需要縮進(jìn),你只要在出現(xiàn)錯(cuò)誤的那一行,按空格或Tab(但不能混用)鍵縮進(jìn)就行。






評(píng)論(0)


暫無數(shù)據(jù)
CDA考試動(dòng)態(tài)
CDA報(bào)考指南
推薦帖子
0條評(píng)論
0條評(píng)論
0條評(píng)論