老大哥们给看看为什么啊,想不通啊
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for name in L:
if name in s:
s.remove(name)
else:
s.add(name)
print s
为什么我出现错误显示file “stdin”,line 6 print s
syntaxerror; invalid syntax
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for name in L:
if name in s:
s.remove(name)
else:
s.add(name)
print s
为什么我出现错误显示file “stdin”,line 6 print s
syntaxerror; invalid syntax
2017-09-15
举报