The @staticmethod is a decorator used to declare a static method. Such a method does not need to access the class or instance; it is equivalent to a regular function defined within the class's namespace.

The difference between a static method and a regular method is that it does not have permission to access class or instance attributes because it does not receive self, cls, or any other instance parameters.

Example of Using @staticmethod

class MathUtils:
    @staticmethod
    def add(a, b):
        return a + b

    @staticmethod
    def subtract(a, b):
        return a - b

print(MathUtils.add(2, 3))        # 5
print(MathUtils.subtract(7, 5))   # 2