【发布时间】:2015-08-07 02:57:48
【问题描述】:
我有一些 Python 代码无法运行。错误消息说:
unindent 不匹配任何外部缩进级别
def main1():
password = "LPPJJAS"
user_input = raw_input('Please Enter Password: ')
if user_input == password:
print 'All distances have been split so one pixel is equal to two centimetres'
time.sleep(1)
elif user_input != password:
print 'Incorrect Password, terminating... \n'
exit("pow")
if __name__ == "__main__":
main1()`
【问题讨论】:
-
错误消息应该会提示您在哪里,但对我来说它看起来像
print 'All distances...'之前的额外空格
标签: python indentation