QuestionQ263

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What output is expected from the following code?

Question Image

Explanation

A set stores each distinct value only once. The resulting set contains 1, 2, 3, and 4, so len(data) returns 4.

Community Discussion

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