#P1830. 实现 replace 函数
实现 replace 函数
题目描述
实现Python中的 replace(s, old_str, new_str)函数,replace 的作用将原字符串s中的old_str字符串替换为new_str字符串
本题需要递交的内容
- replace 以及相关函数
- 以下 4 行代码
s = input()
old_str = input()
new_str = input()
print(replace(s, old_str, new_str))
样例
gua
a
b
gub
gua
gua
six
six