I have a list of Booleans:
[True, True, False, False, False, True]
and I am looking for a way to count the number of True in t
True
You can use sum():
sum()
>>> sum([True, True, False, False, False, True]) 3