nested if statements in python examples