<AptiCode/>

Question 516: What is the purpose of the__len__()method in Python classes in the context of polymorphism?

tcs
wipro
infosys
general
aptitude
polymorphism

The__len__()method is used to customize the behavior when thelen()function is called on an instance of the class, allowing for polymorphic behavior.