Select true statements about the static method. (select 2)
Select true statements about the static method. (select two)
a. To get a static method, use the @staticmethod
decorator.
b. A static method is a method that is bound to a specific instance of a class.
c. A static method is a method that acts like a normal function, only it is implemented in the class and is not bound to a specific instance of the class or the class itself.
d. To get a static method, use the @classmethod
decorator.
e. To get a static method, use the @property
decorator.
a. To get a static method, use the @staticmethod
decorator.
c. A static method is a method that acts like a normal function, only it is implemented in the class and is not bound to a specific instance of the class or the class itself.
e. To get a static method, use the @property
decorator.
Explanation:
@staticmethod
– transform a method into a static method.