Indenta in Python tionError:unindent does Error

This Po is reproduced:
Today in the net copy of a piece of code, the code is very simple, every line looks like the indentation of the indentation, run the time appeared the following error:

1. The most common reason for this error is that, indeed, there is no indentation. Depending on the number of lines of error, the code looks fine, there are indenting, and there are no syntax errors.
2. After looking through the code and realizing that nothing really went wrong, it occurred to me to display all the characters in the current Python script (including Spaces and TAB characters) to see if there was any indentation or any other special characters.

Notepad++, the current text editor, has a setting to display all characters.
view — > Display symbol – & GT; Show Spaces and tabs
so you can see whether or not our Python code is indented.

Finally, it turns out that the error is actually caused by the fact that the error line appears to be indented, but actually it is not. This is the root of the problem.
I found a problem that none of the Python code I copied was indent, which requires extra attention when We copy other people’s code. Don’t make it look like your code is indented to feel ok, it’s not actually indented.

Read More: