culTest

    One of the 50 questions in this topic

    How much do you know about Python?

    What is inheritance in Python?

    Answers

    A mechanism to fund Python projects
    A mechanism where one class can derive attributes and methods from another classCorrect
    A technique to import multiple modules at once
    A method to copy objects

    Inheritance is a mechanism where one class (subclass) can derive attributes and methods from another (superclass), allowing code to be reused and modeling 'is-a' relationships. Python supports multiple inheritance (one class can inherit from several), resolving conflicts using the C3 (Method Resolution Order) algorithm. The super() function allows access to superclass methods, making it easy to extend existing behavior.