culTest

    One of the 50 questions in this topic

    How much do you know about Python?

    What is polymorphism in Python?

    Answers

    The ability of a function to change its behavior
    The ability of an object to take many formsCorrect
    A method to transform data types
    A technique to create multiple instances of a class

    Polymorphism is the ability of different classes of objects to respond to the same message or method in different ways. In Python, it is implemented naturally because of its duck typing: if an object has the expected methods and properties, it can be used regardless of its type. This allows you to write more generic and flexible code that works with different types of objects.