結果 : replace duplicate characters in a string in python