python:SyntaxError: unindent does not match any outer indentation level
在python idle 中编辑if...elif 关于缩进时总是报如下的错误>>> if OJ_price < 1.25:
print("Get one,I'm thirsty.");
else:
else 前面我加了四个空格,因为看到书里面if 和else是对齐 。后来经过验证 其实应写成如下
>>> if OJ_price < 1.25:
print("Get one,I'm thirsty.")
elif OJ_price < 2.00 :
elif 是顶头写 所以一定要多动手哦
页:
[1]