nested if statement in python definition