結果 : how to avoid if else in python