結果 : replace string based on index python