QuestionQ26

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output from the following code?

Question Image

Explanation

Multiple assignment uses positional unpacking. In t1, t3 = t2, t4, t1 is assigned the tuple previously stored in t2, so printing t1 displays ('A', 'D', 'Z').

Community Discussion

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