(Oct-31-2023, 10:57 AM)akbarza Wrote: I used cmd for the command: pip install py-expression-evalThen you most follow the Doc py-expression-eval.
and then I changed the code to:
>>> from py_expression_eval import Parser >>> >>> parser = Parser() >>> p = parser.parse('53 * (-4) +2 * 3') >>> p.evaluate({}) -206Or Simpleeval.
>>> from simpleeval import simple_eval >>> >>> simple_eval(" 53 * -4 +2 * 3 ") -206