Вы можете использовать all
:
if all(not b for b in [bool_1, bool_2, ..., bool_n]):
# means: if all are not True (False)
any
:
if not any([bool_1, bool_2, ..., bool_n]):
# means: if not any of them is True (same as above, logically)
Или sum
(только с типом bool
, в противном случае использовать sum(map(bool, [bool_1, ..., bool_n]))
):
if sum([bool_1, bool_2, ..., bool_n]) == 0: # or, if not sum(...):
# True is 1, False is 0, if sum is 0, then all are 0 (False)