LoginSignup
0
0

More than 3 years have passed since last update.

「IndentationError: expected an indented block」の対処【一瞬で理解できる】

Posted at

「expected an indented block」のエラーは、インデント(字下げ)がないことが原因です。

numbers = ['1', '2', '3']

for n in numbers:
print (n)

# 結果
IndentationError: expected an indented block

print(n)に字下げを入れてましょう!

numbers = ['1', '2', '3']

for n in numbers:
    print (n)

# 結果
1 2 3
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0