Creating the constructor in python We can pass any number of arguments at the time of creating the class object, depending upon the __init__() definition . It is mostly used to initialize the class attributes. Every class must have a constructor, even if it simply relies on the default constructor.