a
and b
are lists of numbers and there are duplicates. b
is a subset of a
.
For example:
a = [1, 1, 1, 2, 2, 3]
b = [1, 1, 2]
I'm working on a function to get the rest of a
after deleting the numbers in b
:
>>> func(a, b)
[1, 2, 3]
I know it can be achived by enumerating through the list, but is there an easier way to get the result?