Python Class Type Check || Class Object || Special Variable || Python
In this we are going to see a basic program to check which class object is it using special variable in Python Programming Language.



class ATest:
    def __init__(self):
        self.x = 5
        self.y = 7
        self.z = 10

    def add(self, num1, num2):
        return num1+num2


a = ATest()
x = a.add(2, 3)
print(x)
print(a.__class__)

# 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