nested if statement in python example w3schools