結果 : replace character in string based on index python