I have a calculation schema as string
calc = "((k+m+46)/2)"
and some strings containing variable like
m = 2 k = m*2
all only strings. Now I want to initialize them into Python. my goal is it to calculate with the calculating schema the varible values.
calc should return 26
I try to exec the vars but in some cases I have to exec the k = m*2 at first and I get error m is not defined!