Looking to import a list of classes and then use them later in the script. Therefore, the from x import *
logic does not work. Here is a more specific layout of what I am looking to do.
class_list = [x, y, z, zz, zzz]
from my_module import class_list
and then later on in the code still be able to call x.random_attribute
. Not sure if this is possible!
To clarify I am trying to avoid the following:
from my_module import x, y, z, zz, zzz
as I have about 50 class objects I am importing and more will be added over time. Would love to have the list as a separate object.