I have a two list of objects say example
L1 = [2,3,4]
L2 = [1,2]
i want to have two different list.
1) matching items 2) not matching items
I am able to get the matching element #1 like below
match = [x for x in L1 if x in L2]
but how can i get the not matching elements in a efficient way.
I can use not in but is there any other way of doing this.
Thanks ,