Barry A. Warsaw added the comment:
bools are subclasses of int and False and True have integer equivalents:
https://docs.python.org/3/library/stdtypes.html#bltin-boolean-values
--
nosy: +barry
resolution: -> not a bug
stage: -> resolved
status: open -> closed
New submission from Alexander Todorov:
When using list.count() I get the following results
>>> [1, 2, 3].count(1)
1
>>> [1, 2, 3, True].count(2)
1
>>> [1, 2, 3, True].count(True)
2
>>> [1, 2, 3, True].count(1)
2
as you can see True is considered the same as 1. T