请问这个运行结果是对的吗
请问这个运行结果是对的吗_
请问这个运行结果是对的吗_
L = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
S = set([1, 3, 5, 7, 9, 11])
for l in L:
for s in S.copy():
if l==s:
S.remove(l)
else:
S.add(l)
print(S)
___________________________________________________
set([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])