zoukankan      html  css  js  c++  java
  • IndentationError: unindent does not match any outer indentation level报错的解决

    执行一个Python脚本的时候,报IndentationError: unindent does not match any outer indentation level" 错误,搜索了一下相关资料,遇到这个错误,是因为新的Python语法中是不支持的代码对齐中,混用TAB和空格的。

    如上所示,可以使用Notepad++打开脚本,勾选显示空格与制表符,此时你会看到代码对齐使用了制表符与空格。

     

    解决方法:

     

    1: 使用工具pycharm  有个快捷键 CTRL+ALT+L格式化代码。

     

     

    参考资料:

    https://www.cnblogs.com/kerrycode/p/11183963.html

  • 相关阅读:
    Vue组件之间传值
    Vue 调试工具
    组件注册
    组件化思想
    图书列表案例
    数组相关API
    Vue常用特性
    选项卡案例
    Vue模板语法
    案例选项卡
  • 原文地址:https://www.cnblogs.com/MarlonKang/p/14138316.html
Copyright © 2011-2022 走看看