본문 바로가기

Develop/Python 3.x

[파이썬 - 오류] IndentationError: expected an indented block

오류가 발생하는 코드

>>> while a<10:
... print(a)
  File "<stdin>", line 2
    print(a)
        ^
IndentationError: expected an indented block


원인 - 들여쓰기 문제로 인한 오류

>>> while a<10:
...     print(a)