In python, indentation is very important:
>>> for i in [1, 2, 3]:
... print(i)
File "<input>", line 2
print(i)
^
IndentationError: expected an indented block
>>> for i in [1, 2, 3]:
... print(i)
...
...
1
2
3
>>>
However, questions about the IndentationError
have been asked so many times, I want to know how to handle them:
Close as dupe, because questions like them have been asked & answered so many times?
Answer it, because almost every question about indentation is different?
Let's check some examples:
And so on...