Python Check If Multiple Variables Constant