【发布时间】:2018-09-30 16:23:08
【问题描述】:
strring ="My name is David and I live is India" # correct the grammer using find and replace method
new_str=strring.find("is") # find the index of first "is"
print(new_str)
fnl_str=strring.replace("is","in") # replace "is" with "in" ( My name is David and I live in India )
print(fnl_str)
【问题讨论】:
-
解释完整的问题或做
strring = strring.replace('live is','live in') -
如果您有其他想法,请查看stackoverflow.com/q/46705546/4320263
标签: python