結果 : python replace last character in string if