Python Programming - Inheritance - Discussion

Discussion Forum : Inheritance - General Questions (Q.No. 35)
35.
What is the purpose of the @abstractmethod decorator?
To create a new instance of the class
To define a method that must be implemented by subclasses
To access class attributes directly
To override a method in the superclass
Answer: Option
Explanation:
The @abstractmethod decorator is used to define an abstract method in a class, which must be implemented by any concrete subclasses.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.