How can you invoke the method of a superclass from a subclass?

  • By calling the superclass method directly
  • By importing the superclass module
  • By using the extends keyword
  • Using the super() function
In Python, you invoke the method of a superclass from a subclass using the super() function. This allows you to access and call methods from the superclass within the subclass.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *