最近搜索
暂无搜索记录
热搜
JAVA
大数据
分布式
Python
人工智能
爬虫
WEB
JavaScript
认证
s1=input('字符串1:')
s2=input('字符串2:')
l1=list(s1)
l2=list(s2)
s=[]
l1.extend(l2)
for i in l2:
if l1.count(i)>1:
s.append(i)
str=''.join(s)
print('公共字符有:%s'%(str))
照书瞎写的能跑的过不了,join()不太懂