Python Inner Class - Multiple || Inner Class || Python
In this we are going to see a basic example of multiple inner class in Python Programming Language.



class Human:
    def __init__(self):
        self.name = 'Help For Coders'
        self.man = self.Man()
        self.think = self.Think()

    class Man:
        def talk(self):
            return 'Talking Function'

    class Think:
        def think(self):
            return 'Thinking Function'

h = Human()
print(h.name)
print(h.man.talk())
print(h.think.think())

# Coded By Dhiraj Shelke


#ENJOY CODING


Post a Comment

FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP

Previous Post Next Post