結果 : nested if statement in for loop python