How do I use 2 variables on 1 driver?

How do I use 2 variables on 1 driver?How would I do it with python?
The purpose of the driver is to toggle the render and visibility in viewport.
Thanks if you take the time to help :slight_smile:


Nvm I figured it out I needed to use this instead (varZ<-0.3) + (var>0.8)