quantify¶
-
sknano.core.itertools.
quantify
(iterable, pred=<class 'bool'>)[source] [edit on github][source]¶ Count how many times the predicate is true.
Examples
>>> from sknano.core import quantify >>> quantify([True, False, True]) 2
sknano.core.itertools.
quantify
(iterable, pred=<class 'bool'>)[source] [edit on github][source]¶Count how many times the predicate is true.
Examples
>>> from sknano.core import quantify
>>> quantify([True, False, True])
2