Python Expression help

So I have a problem where I want to have a collision connected up to an expression that supposed to evaluate if property a or property b is equal to something. How do I do this?
I want to so that if collision with object, and if one of the two properties is equal to 0, then true pulse. I know in java you do
if(var1 == 0 || var2 == 0) for the expression. How do I replicate this in blender
I can’t add a picture, I know how but it wont let me browse my computer.
Any help appreciated

is this a pure python question?

The equivalent of

if(var1 == 0 || var2 == 0) {
    // ...
}

is

if var1 == 0 or var2 == 0:
    # ...

If you need to test 0 ub several variables, you can also use:

if any(map(lambda x: x==0, (var1, var2)))

Lots of ways.

True in {var1,var2} and False in {var1,var2}
any((var1,var2)) and not all((var1,var2))
var1 ^ var2

Ok thanks guys, problem solved :slight_smile: