Getting started
User Guide
Advanced usage
Development
Extras
Evaluate a mathematical expression using a safe evaluation method
expr – the string to be evaluated using math
Examples
>>> math_eval("2^6") 4 >>> math_eval("2**6") 64 >>> math_eval("1 + 2*3**(4^5) / (6 + -7)") -5.0