本节任务这样写为什么不对呢?
s=set(['Adam','Lisa','Paul']) L=['Adam','Lisa','Bart','Paul'] for x in L: for y in s: if x==y: s.remove(y) else: s.add(x) print s
求解答
s=set(['Adam','Lisa','Paul']) L=['Adam','Lisa','Bart','Paul'] for x in L: for y in s: if x==y: s.remove(y) else: s.add(x) print s
求解答
2017-03-26
举报