为什么这个会报错呢?
# Enter a code
s1 = set([1, 2, 3, 4, 5])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
print s1.isdisjoint(s2)
s3 = set([0,])
for i in s1:
if i in s2:
s3.add[i]
print 'The overlapping elements are', s3
# Enter a code
s1 = set([1, 2, 3, 4, 5])
s2 = set([1, 2, 3, 4, 5, 6, 7, 8, 9])
print s1.isdisjoint(s2)
s3 = set([0,])
for i in s1:
if i in s2:
s3.add[i]
print 'The overlapping elements are', s3
2021-08-15
举报