Python Programming, Python Data Structures, Oop Concepts, Learn Python, Python Interview.
to as polymorphism. This is accomplished through the use of inheritance and overriding methods in the child classes. def print_info(person): person.say_hello() person1 = Person("Alice", 30) student1 = Student("Bob", 25, "12345") print_info(person1) # Output: "Hello, my name is Alice and I'm 30