两道代码的练习题,有一些问题,不知道问题出在哪里,有大佬会的吗?
str=“Life is short,I use python”
str2=“”
find1=str.find(“p”)
print(find1)
if find1>0:
str2=str.replace(“p”,“P”)
print(str2)
a =input(“请输入一句话:”)
MIN=“敏感词”
MING_len= len(MIN)
if a.find(MING_len)>0:
find3 = str.find(“p”)
a2=a.replace(“MIN”,“****”)
print(a2)