class MyModule(types.ModuleType):

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
self.instanceA = MyExampleClass(1, 2, 3, 4)
self.instanceB = MyExampleClass(4, 3, 6, 7)
self.instanceC = MyExampleClass(5, 3, 4, 5)

def __iter__(self):
    return iter([self.instanceA, self.instanceB, self.instanceC])
sys.modules[__name__] = MyModule('example')
Is it possible to make a module iterable in Python?