s1 = 'ABC'
s2 = '123'
s3 = 'xyz'
for x in s1:
for y in s2:
for z in s3:
print (x + y + z)
print (x + z + y)
print (y + x + z)
print (y + z + x)
print (z + x + y)
print (z + y + x)
重合的值不是12345嘛,應該是這樣的呀,求童鞋指點
s1 = set([1, 2, 3, 4, 5])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
flag = s1.isdisjoint(s2)
if not flag:
for item in s2:
if item in s1:
print(item)