QuestionQ150

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What output is expected from the following code?

Question Image

Explanation

Dictionary membership checks keys. The values 4 and 10 are keys in y and are skipped by continue; adding 1, 7, 9, and 11 to the initial value of 1 produces 29.

Community Discussion

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