python problem: indentationerror:expected an indented block error resolutionTags: python language2012-07-07 17:59 125145 People read Comments (9) favorite reports Classification:Python Learning Notes (2)
Original address: HTTP://HI.BAIDU.COM/DELINX/ITEM/1789D38EAFD358D05E0EC1DF
The Python language is a language that is very sensitive to indentation, confusing to many beginners, and even a very experienced Python programmer can be caught in a trap. The most common scenario is that the mix of tab and space results in an error, or indentation is incorrect, which is not possible with the naked eye.
This error will occur at compile time indentationerror:expected an indented block indicates that indentation is required here, as long as you press space or tab (but not mix) to indent the line in the wrong line.
Often some people will question: I do not indent how or wrong, the indentation of the place will be indented, non-indentation will be wrong, such as:
If xxxxxx:
(space) xxxxx
Or
def xxxxxx:
(space) xxxxx
And also
For xxxxxx:
(space) xxxxx
A sentence with a colon the next line tends to indent, and the indentation is indented in
Python question: indentationerror:expected an indented block error resolution "Turn"