[Error]SyntaxError: unindent does not match any outer indentation level
刚开始学习Python
解析器用的IDLE,Python3.1,照着某个入门教程敲代码,敲到if的时候,总是出现这个错误
>>> if x<0: x=0 elif x==0:
SyntaxError: unindent does not match any outer indentation level
因为x=0这行回车后,我将elif用空格移动来和if对齐,所以我试试不对齐
1 >>> if x<0:
2 x=0
3 elif x==0:
同样错误:SyntaxError: unindent does not match any outer indentation level
百度,google也没找到答案,无意间试了试不将elif缩进,尽然ok了
1 >>> if x<0:
2 x=0
3 elif 0==x: