Python错误:IndentationError:unindent does not match any outer indentation level 解决办法

版权声明:如需转载,请与我联系。WX:reborn0502 https://blog.csdn.net/gaifuxi9518/article/details/80991090

1.什么错误?

这个英文错误提醒翻译过来就是:缩进错误:缩进不一致。

2.为何出现

代码中同时使用了Tab缩进和空格缩进

3.如何解决

把代码中的缩进全部换成Tab,或者空格

4.sublime Text如何设置Tab的大小?

依次进入菜单 Preferences(首选项)—>Settings(设置)—>Ctrl+F—>搜索tab_size,将值设置为你想设置的大小即可,建议设置成4个空格大小。


猜你喜欢

转载自blog.csdn.net/gaifuxi9518/article/details/80991090