s1 = set([1, 2, 3, 4, 6, 8, 10])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
flag = s1.isdisjoint(s2)
for item in s1:
if item not in s2:
continue
print(item)
严谨,如果不没有重合就不用执行下面的代码了