请问这个是哪里出问题了呢?错误提示:set changed size during iteration
s = set(['Adam', 'Lisa', 'Paul']) L = ['Adam', 'Lisa', 'Bart', 'Paul'] for skey in s: for lkey in L: if lkey == skey: s.remove(skey) print s
s = set(['Adam', 'Lisa', 'Paul']) L = ['Adam', 'Lisa', 'Bart', 'Paul'] for skey in s: for lkey in L: if lkey == skey: s.remove(skey) print s
2017-06-23
举报