If I have the name of a function stored in a string like so:
foo = 'some_function'
Assuming that I could call bar.some_function.baz(), how can I do that using foo? Obviously this example doesnt explain why I couldnt just use some_function but in the actual code I iterate over a list of names of functions that I want to call.
To make it even clearer, if bar.some_function.baz() prints 'Hello world!' then some code, using foo but not some_function should do the same. Is it perhaps possible to use the value of the string and exec()?
Thanks in advance