I have the following lists of Integer
whatToRemove = {2, 3, 8};
and another list
lst = {4, 6, 8}
I want to remove all whatToRemove
the elements from lst
.
I am trying to use lst.remove(whatToRemove.get(i))
, but it is trying to remove the index, and not the value.
How can I do that?