Python Indentation Error Example


Incorrect indentation in Python will give the below IndentationError-

Program
if 1 > 2: #With Indent print("One is greater than two!") elif 1 < 2: #Without Indent print("Two is greater than one!")
Input
Output