Say I have a bunch of variables that are either True or False. I want to evaluate a set of these variables in one if statement to see if they are
True
False
>>> not any([False, False]) True >>> not any([True, False]) False >>>
Use the any() keyword.