Syntax error in Python script run: Indentationerror:unindent does not match any outer indentation level "turn"

Source: Internet
Author: User
Tags python script

http://www.crifan.com/python_syntax_error_indentationerror/

Problem
A python script, which would have run well, then wrote a few lines of code, and also ensured that each line was aligned, but when it ran, there was a syntax error:
Indentationerror:unindent does not match no outer indentation level

"Resolution Process"
1. The most common reason for this error is that there is indeed no alignment. But I'm going to look at the code based on the number of lines I've been wrong.
All with the TAB key, aligned well, there is no misaligned line number AH.
2. Think that the contents of the previous comment affect the syntax of the following statement, so the previous comment has also been deleted.
The result is still this syntax error.
3. After a long day of tossing, suddenly thought of, the current Python script all the characters are displayed to see if there are any special characters.

The currently used text editor notepad++, as if there is a setting that can display all the characters.
Found, in:
Show spaces and tabs, display symbols, view

Syntax error in Python script run: Indentationerror:unindent does not match any outer indentation level "turn"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.