Searched through stack but did not find a answer I could implement in my code.
I have a 'machine' supplied string variable -- no user input -- and need to call a function by the same name. For example:
def add(x, y):
return x + y
the code that calls on the function:
num = function(x, y) ## where function is machine supplied string variable
(i.e. add, subtract, multiply, divide, etc.)
Using the 'raw' variable, function, receives str object not callable. How do I call the fxn given the string input?