class MyClass(object):

    def __init__(self, number):
        self.number = number
my_objects = []
for i in range(100):
    my_objects.append(MyClass(i))
for obj in my_objects:
    pass
Creating a list of objects in Python