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

Comments

Popular posts from this blog

Guess game!

Path for chromedriver