syntax for nested if statement in python with example