Bifurcate list based on values
Splits values into two groups, based on the result of the given filter
list.
- Use a list comprehension and
zip()
to add elements to groups, based onfilter
. - If
filter
has a truthy value for any element, add it to the first group, otherwise add it to the second group.