Static methods can directly instantiate an object , The method can be called directly after the instance
@staticmethod
def fun():
return fun()
Class methods can call class variables directly without instantiation , Static methods can be instantiated , But you cannot use class variables
The instantiated method calls the method itself
class Classname:
@staticmethod
def fun():
print(' Static methods ')
@classmethod
def a(cls):
print(' Class method ')
# Common method
def b(self):
print(' Common method ')
Classname.fun()
Classname.a()
C = Classname()
C.fun()
C.a()
C.b()