QuestionQ43

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output from the following code?

Question Image

Explanation

len() returns the number of top-level elements in a list. This list has six elements; None, the empty tuple (), and the empty list [] each count as one element.

Community Discussion

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