QuestionQ36

VerifiedData Collections – Tuples, Dictionaries, Lists, and Strings

What is the expected output from the following code?

Question Image

Explanation

Python list slicing includes the element at the starting index and excludes the element at the ending index. Therefore, data[1:3] returns the values at indices 1 and 2: [404, 3.03].

Community Discussion

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