Indentation is spaces that are used at the beginning of any statement. The statements with the same indentation belong to the same block.
if True:
print(“we are learning python”)
else:
print(“wrong indentation”)
Error: expecting Identation
Solution:
if True:
print(” we are learning python “)
else:
print(“right indentation”)
Finally, we can say that space==INDENT in python programming.
if True:
print (“I am going to execute”)
print (“True”)
else:
print (“I will print if TRUE is FALSE”)
print (“False”)
ERROR:
if True:
print (” I am going to execute “)
print (“True”)
else:
print (” I will print if TRUE is FALSE “)
print (“This is the wrong indent”)