a = "这就是我说的那个字","你觉得我怎么样?"b = "这"
效果:a= "你觉得我怎么样?"
a = ["这就是我说的那个字","你觉得我怎么样?"] b = "这" for i in range(len(a)-1,-1,-1): if b in a[i]: a.remove(a[i])