您的位置:首页 > 编程语言 > Python开发

Python关于运行出现错误IndentationError: unindent does not match any outer indentation level

2017-06-06 08:46 477 查看
对于利用一些文本工具编程的同学来说比较经常遇到,因为从表面上看,并不能看出来哪里有问题,例如

我这里利用editplus来写代码的



代码运行结果:

root@ubuntu:~# cd shell/

root@ubuntu:~/shell# python 313-1.py 

  File "313-1.py", line 6

    print c

          ^

IndentationError: unindent does not match any outer indentation level

root@ubuntu:~/shell#

原因:

print c使用了4个空格,c=a+b使用了tab键。

都改成tab就好了!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐