Counting the number of True Booleans in a Python List

True is equal to 1.

>>> sum([True, True, False, False, False, True])
3

Leave a Comment