In this example we will show how to define the scope in the code relying on indentation (whitespace at the beginning of a line) in Python.
Source Code
x = 20
y = 8
if x > y:
print('x is greater than y') # you will get an error
Output:
File "demo.py", line 4
print('x is greater than y')
^
IndentationError: expected an indented block