sscasc@tumkur method we have to ( define the class (and the methods)( create an instanceand finally( invoke the method from that instance here is an example class with methodclass mymethod:#define the class def display(self)define the method print ('welcometo class mymethod'obj=mymethod(obj display(self is parameter that references the object itself using selfyou can access object' members in class definition the self is parameter that references the object itself using selfyou can access object' members in class definition the self argumentwhich must be present in all method invocations that argumentrepresents the instance objectis passed to the method implicitly by the interpreter when you invoke method via an instance for exampleyou can use the syntax self to access the instance variable and syntax self (to invoke the instance method for the object self in class to invoke the method we have to instantiate the class and call the method as follows myobj mymethod(create the instance myobj display(now invoke the method constructor (the __init__ methodhere __init__ works as the class' constructor when user instantiates the classit runs automatically class provides special method__init__ this methodknown as an initializeris invoked to initialize new object' state when it is created an initializer can perform any actionbut initializers are designed to perform initializing actionssuch as creating an object' data fields with initial values python uses the following syntax to define classclass classnameinitializer methods you can access the object' data fields and invoke its methods by using the dot operator )also known as the object member access operator exampleconstruct py import math class circleconstruct circle object def __init__(selfradius )self radius radius def getperimeter(self)return self radius math pi def getarea(self)return self radius self radius math pi def setradius(selfradius)self radius radius circle( print( radiussp_python programming