随便输入两个字符串 两个字符串相同的字符打印 有没有大佬帮忙解决
str1=input() str2=input() result='' for i in str1: for j in str2: if i==j and i not in result: result+=i print(result)
s1 = input(">>>") s2 = input(">>>") print(set(s1) & set(s2))