compress(), dropwhile() and filterfalse()

Let's figure out the iterators that do not terminate. i.e. compress(), dropwhile() and filterfalse().

compress(data, selectors)

The compress sub-module is useful for picking the first iterable values according to the second iterable Boolean values. This works by making the second iterable a list of Booleans (or ones and zeroes which amounts to the same thing). Here’s how it works:

Get hands-on with 1200+ tech skills courses.