Q. What does the len() function do in Python?

A
Converts a string to lowercase
B
Returns the length of an object
C
Sorts a list
D
Removes an item
Solution:

The len() function returns the number of items in an object, such as a list, string, or tuple.

Entri PDF Icon

Get Question Bank

Strengthen Your Practice with our comprehensive question bank.

Entri Contact Image

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