original_string = "sentence one. sentence two. sentence three" last_char_index = original_string.rfind(".") new_string = original_string[:last_char_index] + "," + original_string print(new_string) "sentence one. sententce two, sentence three"