OOPS concepts
class Test:
def __init__(self):
print "construcctor"
t1=Test()
t2=Test()
Output:
construcctor
construcctor
Got printed two times because constructor executes automatically at the time of object creation
class Test:
def __init__(self):
print "construcctor"
t1=Test()
t2=Test()
Output:
construcctor
construcctor
Got printed two times because constructor executes automatically at the time of object creation
Comments
Post a Comment