📅  最后修改于: 2022-03-11 14:46:01.388000             🧑  作者: Mango
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"