Indentation plays an essential role in Python. Statements with the same level of indentation belong to the same block of code. The code of an if statement is indented a space further than the code outside it in order to indicate that this is an inner and inter-related block.
The convention of our indents must also be consistent throughout a block. If we have used two spaces to make an indent, we must use two spaces for an indent in the same block. Hence, always keep indentation in mind when writing code.
Indents are important in other aspects of Python, too.