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