I have a module, in the module is a subcomponent which contains a multitude of functions. I need to iterate through a list of names which contains the names of the modules and call the functions. this does not work, "because module has no attribute list". How do I make list[x] callable as a subcomponent of module instead of "list" the name.
file 1:
def x():
print('x')
def y():
print('y')
def z():
print('z')
file 2:
import module # containing functions x(),y(),z()
list = ['x','y','z']
for x in list:
module.list[x]()