Pycharm报错:IndentationError: unindent does not match any outer indentation level

Pycharm报错:IndentationError: unindent does not match any outer indentation level

原因分析:

 

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

 

解决方法:

Pycharm以一个快捷键:Ctrl+Alt+L

Run之后问题就解决了。

 

原文地址:https://www.cnblogs.com/zhoulonghai/p/12803261.html