-2
Can anyone tell me if there’s a way I can turn a string into an algorithm ? for example: a = "1 + 1" => b = 1 + 1. For simple examples it’s easy to create a string interpreter, the problem is that I’ll get to more complex things like "(x**2 - 1)/(x - 1)".
note: I considered the Sympy library.
Do you want a numerical expression evaluator? In C# you can use
CodeDom
https://www.c-sharpcorner.com/article/codedom-calculator-evaluating-C-Sharp-math-expressions-dynamica/– Tony
Exactly. However I look for python. But thank you.
– Sarutobi sama