I am getting an wierd output when I try to append an object created in the loop
animals.txt
ralph, dog, 3
buster, cat, 8
sammy, bird, 5
mac, dog, 1
coco, cat, 6
pet.py
class Pet:
    # The __init__ method initializes the data attributes of the Profile class
    def __init__(self, name ='', animal_type = '', age = ''):
        self.__name = name
        self.__animal_type = animal_type
        self.age = 0
    def __str__(self):
        string = self.__name + ' ' + self.__animal_type + ' ' + str(self.age)
        return string
    def set_name(self, name):
        self.__name = name
    def get_name(self):
        return self.__name
    def set_animal_type(self, breed):
        self.__animal_type = breed
    def get_animal_type(self):
        return self.__animal_type
    def set_age(self, old):
        self.age = old    
    def get_age(self):
        return self.age  
animals.py
import pet
myPet = pet.Pet()
animals = []
infile = open("animals.txt", "r")
lines = infile.readlines()
for line in lines:
    data = line.split(",")
    myPet.set_name(data[0])
    myPet.set_animal_type(data[1])
    myPet.set_age(data[2])
    # print (data[0], data[1], data[2])
    print(myPet)
    animals.append(myPet)    
print(animals)
infile.close()
when I print the object created with each iteration with print(myPet) I get this;
ralph dog 3
buster cat 8
sammy bird 5
mac dog 1
coco cat 6
I then append the object myPet and this is the output repeated 5 times in the list when i print(animals)
pet.Pet object at 0x00000185DCAE1128
I am not sure what is going on I have tried
myPet.set_name(data[0])
animals.append(myPet.get_name)
and
myPet.set_name(data[0])
name = myPet.get_name
animals.append(name)
giving the same error
bound method Pet.get_name of pet.Pet object at 0x000002C0F0BF6C88