QuestionQ103

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What output is expected from the following code?

Question Image

Explanation

A slice with a step of -1 moves backward. The stop index 0 is excluded, so indices 3, 2, and 1 are selected, producing [4, 3, 2].

Community Discussion

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