I have 2 functions as follows:
def test1(var):
return var*2
def test2(var):
return var*4
I want to pass a variable to form part of the code, something like below:
var='test2'
def new_test(var,4):
return var(4)
And I expect the output to be 16 (i.e. output from test2)
In excel, it is achievable via the function of =indirect(...). Is there any way to achieve that in Python?