IndentationError:expected an indented block解决办法

IndentationError:expected an indented block解决方法在编译时会出现这样的错IndentationError:expected

IndentationError:expected an indented block解决方法

在编译时会出现这样的错IndentationError:expected an indented block说明此处需要缩进,你只要在出现错误的那一行,按空格或Tab(但不能混用)键缩进就行。例如:if xxxxxx:   (空格)xxxxx   或者   def xxxxxx:   (空格)xxxxx   还有   for xxxxxx:   (空格)xxxxx   一句话 有冒号的下一行往往要缩进,该缩进就缩进