Can someone tell me how can I Call a function in a string with function name in python program? E.x. Let's assume I have a module foo and a string with content "bar". So what can I do to call foo.bar()?
I know how to do this by using eval but I am looking for some another better method because I want a return value of the function and that's why I can't use it. I just want more efficient way to perform this task.