题解 | #牛牛的替换#
牛牛的替换
https://www.nowcoder.com/practice/f2a107dbb99243798d3048a672e8f747
def re(s, a, b): s = s.replace(a, b) return s while True: try: ls = list(input().split()) n = input() print(re(re(n, ls[1], ls[2]), ls[3], ls[4])) except: break
牛牛的替换
https://www.nowcoder.com/practice/f2a107dbb99243798d3048a672e8f747
def re(s, a, b): s = s.replace(a, b) return s while True: try: ls = list(input().split()) n = input() print(re(re(n, ls[1], ls[2]), ls[3], ls[4])) except: break
相关推荐