結果 : how to write nested if statement in python