If I have one element alone this is easy:
>>> 3 not in [2, 3, 4] False >>> 3 not in [4, 5, 6] True
But what if I have two lists and have to check if the elements in list A
occur in list B
?
A=[1,2,3,4]
B=[4,5,6,7]
How do I get a results showing me that 1
,2
,3
are not in list B
?