You can remove the items that you want by using list comprehension and below is the example of list comprehension:
somelist = [x for x in somelist if not determine(x)]
Or, Another thing can be done is by using the slicing method, you can mutate(change in form) the existing list to contain only the items you want. This approach could be useful if there are other references to somelist that need to reflect the changes.
somelist[:] = [x for x in somelist if not determine(x)]
If you want other ways to solve this problem you can use the itertools module:-
The itertool module standardizes a core set of fast memory efficient tools that are useful by themselves in combination. Together, they form an “iterator algebra” making it possible to construct specialized tools succinctly and efficiently in pure Python.
An example that illustrates the use of itertools:-
from itertools import filterfalse
somelist[:] = filterfalse(determine, somelist)