I am trying to become more familiar with the itertools module and have found a function called ifilter.
itertools
ifilter
From what I understand, it filters
ifilter returns a generator, not a list.
Generators create their items on the fly when needed, instead of allocating the entire list first. That's the only difference between ifilter and filter
filter