哪里错了。。
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for name in L:
if name in s:
s.removed(name)
else:
s.add(name)
print s
就是通不过·······
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for name in L:
if name in s:
s.removed(name)
else:
s.add(name)
print s
就是通不过·······
2016-06-04
举报