I'm just getting to grips with Object Oriented Programming and I am stuck on how multiple objects are created without explicit defining in the code. For example in a while loop, setting a name and age for a dog, creating an object for it, and then giving it a unique identifier.
This is probably a simple question and I am missing something obvious but I can't get my head around it and some help would be appreciated. I have tried looking before but I can't find anything that helps.
Thanks
Edit: I've been asked for some code as an example. Strictly speaking, I'm not stuck on a specific problem, more of a general question but I was thinking of something along the lines of the following
class Dog(self,name,age):
#Class stuff
while True:
dog_name=input("Enter dog name: ")
dog_age=input("Enter dog age: ")
dog=Dog(dog_name,dog_age)
My aim of this is to create multiple dog objects with different names/ages. However, I am worried that I will not be able to target a specific dog later in the code since they will all be saved as "dog". Is there any way of looping this to create something along the effect of dog1, dog2, dog3 etc. or is there another way of doing it entirely?