Python indentation error in if statement -


i have following trouble in python.

sister_age = 15  brother_age = 12  if sisiter_age > brother_age:     print "sisiter older"     else: 

error:

syntaxerror: invalid syntax  if sisiter_age > brother_age:     print "sisiter older"     else:    file "<pyshell#5>", line 4     else:         ^ indentationerror: unindent not match outer indentation level 

no matter how many times try change index, shows error.

assuming there after else statement, else statement should aligned if statement, not inside it.

example -

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

also, if not have (or need) inside else statement, should remove it.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -