Python Lambda Function With Multiple Variables Solver