結果 : how does nested if work in python