結果 : how to do a nested if statement in python