QuestionQ115

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

Which of the following statements can be used to return the length of the string str?

Explanation

Python returns a string’s length with the built-in len() function. The underlying special method is __len__(), but it is normally invoked through len(str).

Community Discussion

No comments yet. Be the first to start the discussion!