-
Notifications
You must be signed in to change notification settings - Fork 0
Use
Flavio Lionel Rita edited this page Apr 25, 2021
·
1 revision
Exp is the main class of the library that contains the methods to parse, evaluate, get info of expression, etc . In order to use the library you need to create an instance of this class:
from py_expression.core import Exp
exp = Exp()from py_expression.core import Exp
exp = Exp()
operand =exp.parse('a+4')from py_expression.core import Exp
exp = Exp()
operand =exp.parse('a+4')
result = exp.eval(operand,{"a":2})from py_expression.core import Exp
exp = Exp()
operand =exp.parse('a+4')
result = operand.eval({"a":2})from py_expression.core import Exp
exp = Exp()
result =exp.parse('a+4').eval({"a":2})