解决 Python 缩进错误

Resolve Python Indent Errors

Python: 版本 3.6

编辑:记事本++

Link 到文件:GitHub Repository


我在 process_string.py 中添加了两行,但出现错误

File "process_string.py", line 14 if i.find(k)!=-1 and flag==False: ^ TabError: inconsistent use of tabs and spaces in indentation

在 Notepad++ 中,我转到 View > Show Symbol > Show All Characters,其中显示了两行三个红色箭头。

如果我尝试删除红色箭头,我仍然会出现缩进错误。

如何修复?

您应该使用制表符或空格。删除缩进并使用任何一个 .