Lines and Indentation in the Python
Categories: Python
Python provides nobraces to indicate blocks of code for class and function definitionsor flow control. Blocks of code are denoted by line indentation,which is rigidly enforced.
The number ofspaces in the indentation is variable, but all statements within theblock must be indented the same amount. For example −
if True:
print "True"
else:
print "False"