s = set(['Adam', 'Lisa', 'Paul']) L = ['Adam', 'Lisa', 'Bart', 'Paul'] for x in L: if x in s: s.remove(x) else: s.add(x) print s
zqsufe
相关分类