python代码运行出现以下异常:
IndentationError: unindent does not match any outer indentation level
[img]http://dl2.iteye.com/upload/attachment/0110/9442/84817354-6868-3d25-b3c6-40aa36913730.png[/img]
可能导致的原因:该行代码缩进的方式和其他行的代码不一致
([color=red]tab键缩进[/color]和[color=red]4个空格键缩进[/color]存在冲突)
网页上复制过来的代码是用4个空格键缩进的,通常手动写的代码使用tab键进行缩进
IndentationError: unindent does not match any outer indentation level
[img]http://dl2.iteye.com/upload/attachment/0110/9442/84817354-6868-3d25-b3c6-40aa36913730.png[/img]
可能导致的原因:该行代码缩进的方式和其他行的代码不一致
([color=red]tab键缩进[/color]和[color=red]4个空格键缩进[/color]存在冲突)
网页上复制过来的代码是用4个空格键缩进的,通常手动写的代码使用tab键进行缩进