主页
Python
Python String replace() 方法
demo_ref_string_replace
运行 ❯
×
更改方向
保存代码
更改主题
txt = "I like bananas" x = txt.replace("bananas", "apples") print(x)
I like apples