though methods works in exactly the same way as function except one point where method first argument is instance object we can classify methods based on how they behavelike simple methoddefined outside of class this function can access class attributes by feeding instance argumentdef outside_func(()instance methoddef func(self,class methodif we need to use class attributes @classmethod def cfunc(cls,static methoddo not have any info about the class @staticmethod def sfoo(till now we have seen the instance methodnow is the time to get some insight into the other two methodsclass method the @classmethod decoratoris builtin function decorator that gets passed the class it was called on or the class of the instance it was called on as first argument the result of that evaluation shadows your function definition syntax class (object)@classmethod def fun(clsarg arg )funfunction that needs to be converted into class method returnsa class method for function