CS Electrical And Electronics
@cselectricalandelectronics

Write a code for single inheritance in Python?

All QuestionsCategory: PythonWrite a code for single inheritance in Python?
Chetan Shidling asked 4 years ago

I need short information.

1 Answers
Chetan Shidling answered 4 years ago

class A:
       def chetan1(self):
              print(“Chetan 1 working”)
       def chetan2(self):
              print(“Chetan 2 working”)
 
class B(A):
        def chetan3(self):
               print(“Chetan 3 working”)
        def chetan4(self):
               print(“Chetan 4 working”)
class C(B):
         def chetan5(self):
              print(“Chetan 5 working”)