Title is pretty self explanatory. I want a condition to be satisfied if any of 16 different variables are true, but I feel like there has to be a better/cleaner way to do it than typing out if A = True or B = True .... etc etc. Is there?
You can use any()
:
any([A, B, ...])
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With