我是Python初学者,尝试使用replace函数,遇到了以下问题:
quote="Inquiring the application issues"
t=quote.title()
print(t) #prints "Inquiring the Application Issues"
t=t.replace("the","a") #try to replace "the" to "a" in the title-formatted quote
print(t) #still prints "Inquiring the Application Issues", "the" didn't get replaced
有人能指出我的问题吗?非常感谢!你知道吗
打印(t)#打印“查询申请问题”
不是“询问申请问题”?你知道吗
使用调试器或交互式shell:
注意
The != the
。你知道吗相关问题 更多 >
编程相关推荐