The original address: http://hi.baidu.com/delinx/item/1789d38eafd358d05e0ec1df
Python is a very sensitive language for indentation, causing confusion for beginners and even experienced Python programmers, who can fall into the trap. The most common situation is that mixing tabs and Spaces causes errors, or indenting incorrectly, which is impossible to distinguish with the naked eye.
This fault occurs on compile IndentationError: expected an indented block here need to indent, you as long as there is an error in the line, press the space or Tab (but you can’t mix) key indentation.
Often some people will question: I did not indent how or wrong, wrong, the place where the indent should be indent, not indent will be wrong, such as:
If XXXXXX:
(space) XXXXX
or
Def XXXXXX:
(space) XXXXX
There are
For XXXXXX:
(space) XXXXX
The next line of a sentence with a colon is often indented
Python is a very sensitive language for indentation, causing confusion for beginners and even experienced Python programmers, who can fall into the trap. The most common situation is that mixing tabs and Spaces causes errors, or indenting incorrectly, which is impossible to distinguish with the naked eye.
This fault occurs on compile IndentationError: expected an indented block here need to indent, you as long as there is an error in the line, press the space or Tab (but you can’t mix) key indentation.
Often some people will question: I did not indent how or wrong, wrong, the place where the indent should be indent, not indent will be wrong, such as:
If XXXXXX:
(space) XXXXX
or
Def XXXXXX:
(space) XXXXX
There are
For XXXXXX:
(space) XXXXX
The next line of a sentence with a colon is often indented
Read More:
- Indenta in Python tionError:unindent does Error
- Built on Ethereum, puppeth cannot be used to create the initial block, and an error is reported Fatal: Failed to write genesis block: unsupported fork ordering: eip15
- Using np.set in Python 3_ Printoptions (threshold = NP. Nan) raises an error resolution
- display:inline-block Solution to the gap problem
- Encountered a problem — Python — Python 3 uses Sqlalchemy to report an error‘
- ORA-19502: write error on file “”, block number (block size=)
- wordpress :This block has encountered an error and cannot be previewed
- error Expected an assignment or function call and instead saw an expression
- Solve the problem of “error empty block statement no empty” in the console (Vue project)
- Error cs1002:; expected error resolution
- Python3-ValueError:not enough values to unpack (expected 2, got 0)
- The python script tool of ArcGIS reports an error: indentationerror: unexpected indent solution
- Resolution of internal server error problem in diango project
- Windows libreoffice 6.3.5 installation error 1355 problem resolution
- Python about typeerror: required argument ‘mat’ (POS 2) not found error resolution
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- Vue reports an error sasserror: expected newline
- Android 9 (P) recovery upgrade Map of ‘@/cache/recovery/block.map’ failed problem analysis guide
- Python: How to Fix “Ord() expected string of length 1, but int found”
- Vue element UI uses this. $notify is not a function problem resolution using the notification box