题解 | #字符串操作#
字符串操作
http://www.nowcoder.com/questionTerminal/06a5336b64e3481fbbcc1f7d5cba548d
卡了一下输入,其他就是常规写法 n,m = map(int, input().split()) s = input() ss = [] for i in s: ss.append(i) for i in range(m): l,r,ch1,ch2 = input().split() #l,r = map(int, input().split()) #ch1,ch2 = map(str,input().split()) for j in range(int(l)-1,int(r)): if ss[j] == ch1: ss[j] = ch2 print(''.join(ss))