culTest

    One of the 50 questions in this topic

    How much do you know about Python?

    What is an abstract class in Python?

    Answers

    A class that cannot be instantiated directlyCorrect
    A class without concrete methods
    A class defined abstractly or theoretically
    A class that only contains attributes, not methods

    An abstract class cannot be directly instantiated and may contain abstract methods that subclasses must implement. In Python, they are created with the abc module (Abstract Base Classes): class MyAbstractClass(ABC): @abstractmethod def method(self): pass. Abstract classes define common interfaces and partial behavior that subclasses complete, facilitating polymorphism and code reuse while ensuring that subclasses implement certain functionality.