I would like to know if it is a good practice to use tuples instead of separated expressions in a if statement.
is_dog = True
is_brown = False
I would like to do like this:
if (is_dog, is_brown):
do_something()
Instead of like this:
if is_dog or is_brown:
do_something()
What is the best practice in this case? Thank you
is_dogandis_catis True,if (is_cat, is_dog):will be Trueif (is_cat, is_dog):not equals toif is_dog or is_cat:anyandall: stackoverflow.com/questions/19389490/…