Indentation
Indentation
Purpose of Indentation
For example:
if condition:
# This indented block belongs to the 'if' statement
print("Condition is True")
# More code here will be part of the 'if' block
Indentation Rules
Consistent Indentation: Indentation must be consistent. That is, all lines of code
within the same block must use the same number of spaces or tabs
Example:
if True:
print("True")
else:
print("False") # This is correctly indented.
Incorrect indentation: