nested if statement in python syntax and example