感觉意思差不多,为啥没用呢,请老师解惑~
s = set(['Adam', 'Lisa', 'Paul']) L = ['Adam', 'Lisa', 'Bart', 'Paul'] for x in L: x in s if False: s.add(x) print s
s = set(['Adam', 'Lisa', 'Paul']) L = ['Adam', 'Lisa', 'Bart', 'Paul'] for x in L: x in s if False: s.add(x) print s
2017-06-15
举报