SyntaxError: inconsistent use of tabs and spaces in indentation
2017-05-10 14:31
507 查看
1、错误描述
>>> score = int(input('输入一个分数:'));
输入一个分数:78
>>> if score >= 90:
grade = 'A';
elif score >= 80:
SyntaxError: invalid syntax
>>> score = int(input("输入一个分数:"));
输入一个分数:87
>>> if score >= 90:
grade = 'A';
elif score >= 80:
SyntaxError: inconsistent use of tabs and spaces in indentation
>>>
2、错误原因 不一致使用Tab和Space键缩进代码
3、解决办法
使用Backspace键对代码进行排版
>>> score = int(input('输入一个分数:'));
输入一个分数:78
>>> if score >= 90:
grade = 'A';
elif score >= 80:
SyntaxError: invalid syntax
>>> score = int(input("输入一个分数:"));
输入一个分数:87
>>> if score >= 90:
grade = 'A';
elif score >= 80:
SyntaxError: inconsistent use of tabs and spaces in indentation
>>>
2、错误原因 不一致使用Tab和Space键缩进代码
3、解决办法
使用Backspace键对代码进行排版
相关文章推荐
- inconsistent use of tabs and spaces in indentation
- python错误提示“TabError: inconsistent use of tabs and spaces in indentation”
- python 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解决方法
- Sorry: TabError: inconsistent use of tabs and spaces in indentation (alien_invasion.py, line 19)
- TabError: 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
- python 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 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
- how to write your annotation types and make use of built-in annotations to control their behavior
- Use of pushglobaltable and setfenv in Lua5.3
- node.js中遇到SyntaxError: Use of const in strict mode
- Use Module and Function instead of Class in Python
- Jade报错:Invalid indentation,you can use tabs or spaces but not both问题