QuestionQ241

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the output of this code snippet?

Question Image

Explanation

The list contains the squares of 0 through 4. Its element at index 2 is 4, so the deletion uses index 4 and removes 16, leaving [0, 1, 4, 9].

Community Discussion

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