結果 : if and for loop in one line python