Ilan
0
Q:

apply boolean to list

>>> from itertools import compress
>>> list_a = [1, 2, 4, 6]
>>> fil = [True, False, True, False]
>>> list(compress(list_a, fil))
[1, 4]
0

New to Communities?

Join the community