+ 1
Then you should write a program that searches for example sin in input and replaces it with math.sin. And the same way for power, ^ should be replaced with **. Then you can use eval.
26th Jan 2018, 5:03 AM
Petr Leliaev
Petr Leliaev - avatar
+ 1
Use function eval. >>>a='x+1' >>>x=3 >>>eval(a) >>>4
25th Jan 2018, 5:05 PM
Petr Leliaev
Petr Leliaev - avatar
0
You are welcome :)
26th Jan 2018, 1:20 PM
Petr Leliaev
Petr Leliaev - avatar