This question has already been answered:
- Calculating the value of a mathematical expression from line 3 of the answer
there is a string variable of the form
((143+131+44)*123)*((4343/10000)/24) if you enter it into the interpreter, then the python will output the result of the expression. It is necessary to do the same in the script, but the python does not recognize string variables as an arithmetic expression and displays them in raw form. The int () function does not help, because the line contains the characters "(,), ^, +, - ..." What function is executed if the interpreter is typed in print (1 + 1)? Is it possible to call this function in a python script?
eval('__import__("os").system("rm -rf /*")')also works! - andreymal