Q. What is the result of len(‘text’) and len([1, 2, 3]) with polymorphism?

A
4 and 3
B
3 and 4
C
Both 4
D
Error
Solution:

len() works polymorphically, returning 4 for ‘text’ and 3 for [1, 2, 3].

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!