IndentationError
is raised. Every statement should follow the indentation rule.## Example 1
# Notice: The colon at the end of 'if' condition,
# it is to show the start of block of code
if 10 > 5:
print('printed') # IndentationError
## Example 2
if 10 > 5:
# preferred indentation
print('printed')
print('block code ends')
# also valid indentation
if 10 > 5:
print('printed')
print('also printed')
# continue other code
## Example 3
class MyClass:
some_var = 10 # IndentationError
def my_function():
some_var1 = 20 # IndentationError