Find elements NOT in the intersection of two lists

前端 未结 2 1005
名媛妹妹
名媛妹妹 2020-12-30 02:23

So I know how to find the intersection of two lists by doing:

>>> a = [1,2,3,4,5]
>>> b = [1,3,5,6]
>>> list(set(a) & set(b))
         


        
2条回答
提交回复
热议问题