[Solved] Python indentation error in if statement [closed]


Assuming there is something after the else statement, the else statement should be aligned with the if statement, not inside it.

Example –

if sisiter_age > brother_age:
    print "sisiter is older"
else:

Also, if you do not have (or need) anything inside the else statement, you should just remove it.

0

solved Python indentation error in if statement [closed]