QuestionQ65

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output of this code?

Question Image

Explanation

The assignments shift the values at indices 1 through 5 left by one index. The last list element is never overwritten, so the resulting list is 2 3 4 5 6 6.

Community Discussion

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