I wanted to make a 100 objects from the same class and print the names of the objects each time they were created. Something like this:
class Human():
def __init__(self):
#print the name of the object
human1 = Human()
human2 = Human()
human3 = Human()
human4 = Human()
human5 = Human()
.......
I was able to come this far:
class Human():
def __init__(self):
#print the name of the object
for i in range(1,101):
#'human' + str(i) = Human()
But I got stuck since in python you cannot define objects as the way I tried to and I couldn't find a way to print the name of the object. Anything that could help?