python纠错TabError: inconsistent use of tabs and spaces in indentation
2018-07-16 17:25
1081 查看
因为是用的他人电脑学习,没有安装什么编译器学习,就简单的下载了一个notepad++写代码,今天出现了这样一个错误
在网上查阅后得知: tab换成空格就行了
不解
在print()后直接敲回车就可以得到一个与上行相同的缩进
缩进一样的情况下为何还会报错呢?(请教各位)
后来发现
(选中敲回车的缩进部分是一个整体)
只需要删除前面的缩进再用空格敲出相应的空格就行了
(像x之前的部分 选中时是四个间隔)
这样就可以解决了。
另我的问题是为什么?回车后的缩进是算一个字符间隔吗?
相关文章推荐
- python TabError: Inconsistent use of tabs and spaces in indentation
- python错误提示“TabError: inconsistent use of tabs and spaces in indentation”
- python出现错误: Sorry: TabError: inconsistent use of tabs and spaces in indentation
- Sorry: TabError: inconsistent use of tabs and spaces in indentation (alien_invasion.py, line 19)
- python inconsistent use of tabs and spaces in indentation
- python inconsistent use of tabs and spaces in indentation
- taberror inconsistent use of tabs and spaces in indentation pycharm
- TabError: Inconsistent use of tabs and spaces in indentation
- TabError: Inconsistent use of tabs and spaces in indentation
- PyCharm出现TabError: inconsistent use of tabs and spaces in indentation最简单实用的解决办法
- TabError: Inconsistent use of tabs and spaces in indentation
- TabError: inconsistent use of tabs and spaces in indentation
- inconsistent use of tabs and spaces in indentation解决方法
- 【转】TabError:inconsistent use of tabs and spaces
- inconsistent use of tabs and spaces in indentation
- vim 报错:inconsistent use of tabs and spaces in indentation
- TabError: inconsistent use of tabs and spaces in indentation
- SyntaxError: inconsistent use of tabs and spaces in indentation
- TabError: Inconsistent use of tabs and spaces in indentation
- Python 错误:Error: Inconsistent indentation detected!...