結果 : if else and for loop in one line python