nested if else statement in python definition