有没有大佬帮我看看这个代码,明明四五行的代码debug半天找不出来错误.....

text1,text2=input(),list(input())
[text2.remove(i) for p in text1 for i in text2 if i==p or i==p.lower()]
if '+' in text1:
    text2=[p for p in text2 if p !=p.upper() or p in ',._-+' or p.isdigit() ]
print(''.join(text2))

为啥这个测试点一过不去啊.....

# text1, text2 = input(), list(input())
text1, text2 = "7+IE.", list("7_This_is_a_test.")

[text2.remove(i) for p in text1 for i in text2 if i == p or i == p.lower()]

if '+' in text1:
    text2 = [p for p in text2 if p != p.upper() or p in ',._-+' or p.isdigit()]

print(''.join(text2))

等着你input内容的吧