結果 : how to replace the last character of a string in python