【Python】输入两个字符串,在第一字符串中删除第二个字符串中所包含的所有字符

s1 = input('s1: ')
s2 = input('s2: ')
for i in s1:
    if i in s2:
        s1 = s1.replace(i,'')
print(s1)

本文来自博客园,作者:木子欢儿,转载请注明原文链接:https://www.cnblogs.com/HGNET/p/15493692.html

原文地址:https://www.cnblogs.com/HGNET/p/15493692.html