“inconsistent use of tabs and spaces in indentation”

后端 未结 28 2204
北恋
北恋 2020-11-22 00:56

I\'m trying to create an application in Python 3.2 and I use tabs all the time for indentation, but even the editor changes some of them into spaces and then print out \"inc

28条回答
  •  孤街浪徒
    2020-11-22 01:21

    I use Notepad++ and got this error.

    In Notepad++ you will see that both the tab and the four spaces are the same, but when you copy your code to Python IDLE you would see the difference and the line with a tab would have more space before it than the others.

    To solve the problem, I just deleted the tab before the line then added four spaces.

提交回复
热议问题