org = [1,1,1,1,2,2,4]
remove = [1,1,2]
result = foo(org, remove)
# result = [1,1,2,4]
# two 1 are removed and one 2
I want to remove items from org, but not all with the same value - only one remove each item in the remove-array
Is there a numpy function to do so?
[org.remove(i) for i in remove]. Note that this will throwValueErrorifiis not inorg, so you need to handle that. Also @CJR has a point, I dont know what is the use case but consider it.