Answers for "calling function whose name is in a variable"

0

calling function whose name is in a variable

module = __import__('foo')
func = getattr(module, 'bar')
func()
Posted by: Guest on July-20-2021

Code answers related to "calling function whose name is in a variable"

Python Answers by Framework

Browse Popular Code Answers by Language