当前位置:   article > 正文

unindent does not match any outer indentation level报错的解决_unindent doesn't match any outer indent level

unindent doesn't match any outer indent level

unindent does not match any outer indentation level报错的解决

在运行python的过程中,编译器有可能会报错如下:
  • 1

在这里插入图片描述
在遇到这种问题的时候,需要注意是不是Tab/空格键导致的错误,因为Python是依靠空格和tab来进行代码分层的,因而会出现bug。

而最新的Python语法中,代码对齐是无法解决混用出现的问题的,因而我们要注意在for/if等需要分层的地方,及时使用TAB。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/536378
推荐阅读
相关标签
  

闽ICP备14008679号