I have an list of n conditions, for example
cond = [x > 0, x < 10, x == 2]
where x is any variable I wish to test against those conditions. I can easily test these conditions if x is already defined, but what if I want to pass this set of conditions to another function where x has not already been defined? Is there a way in Python to pass this set of conditions while keeping x an anonymous variable? If not, is there an alternative?