The __str__ method

class Dog():
  
  def __str__(self):
    return f'breed: {self.breed}, age: {self.age}, color: {self.color}'
  
a = Dog()
a.breed = 'boxer'
a.age = '2'
a.color = 'white'
print(str(a))
print(a)
breed: boxer, age: 2, color: white
breed: boxer, age: 2, color: white