Zadanie z kodem · Kurs Python · Moduł 3: Programowanie obiektowe

Metoda __eq__

Zaimplementuj __eq__

Zadanie

W klasie Animal(name, species) dodaj metodę __eq__, która porównuje zwierzęta po species (to samo species = równe)