求差集,在B中但不在A中
retD = list(set(listB).difference(set(listA)))
print "retD is: ",retD
retE...= [i for i in listB if i not in listA]
print "retE is: ",retE
def main():
listA = [1,2,3,4,5...code run起来
retA is: [3, 4, 5]
retB is: [3, 4, 5]
retC1 is: [1, 2, 3, 4, 5, 6, 7]
retD is: [6, 7]
retE