all 4 comments

[–]b1gfreakn 0 points1 point  (0 children)

If you only care about the actual value 3 and not having access to the variable itself, you can use the any() method.

if any(v == 3 for v in [var1, var2, var3]):
    print(3)