QuestionQ285

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

Which code snippet below will print the following output to the monitor?

Question Image

Explanation

Filtering the list with if len(d) == 4 prints only the four-character strings: Paul, Mary, and Jane. Peter is not printed because it has five characters.

Community Discussion

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