Javascript Rules Engine Python W3schools