请问有isdisjoint和没有有什么区别?我把重合的判断注释后还是能出结果
s1 = set(['A', 2, 3, 4, 5, 8])
s2 = set(['A', 2, 3, 4, 5, 6, 7, 8, 9, 10])
# S = s1.isdisjoint(s2)
# if not S :
for i in s1:
if i not in s2:
continue
print(i)
s1 = set(['A', 2, 3, 4, 5, 8])
s2 = set(['A', 2, 3, 4, 5, 6, 7, 8, 9, 10])
# S = s1.isdisjoint(s2)
# if not S :
for i in s1:
if i not in s2:
continue
print(i)
2022-02-23
举报