結果 : replace last occurrence of a character in a string python