結果 : avoid nested if statements python