Jul-28-2021, 09:30 AM
I am a newbie here. I have written simple code for reading purposes. I wanted to how can print the value from the Base class itself
I have a Breed class for trial purposes. If I create an object then I can access an element in the below code. IS it possible to write directly from main and derived class
I have a Breed class for trial purposes. If I create an object then I can access an element in the below code. IS it possible to write directly from main and derived class
class Animals: def Dog_Animal(self): print("category-Dog") class Dog_breed(Animals): def Breed(self): print("Bow-Bow") class Dog_child(Dog_breed): def Breed(self): print("Bow-Bow-child") d=Dog_child() d.Breed() d.Dog_Animal() New=Dog_breed() New.Breed() test=Animals() test.Dog_Animal()