Computer Science, asked by eswarchaitanya8608, 4 months ago

Given the list[1,3,6,82,5,7,11,92].Find the output of print(L[2:5]).

Answers

Answered by allysia
0

Answer:

The output should be a list of element beginning from index 2 and and ending at index 4 which is:

[6,80,5]

Answered by duragpalsingh
0

Question:

Given the lists L=[1,3,6,82,5,7,11,92] , write the output of print(L[2:5])​

Solution:

We know,

Any L[x:y] prints the elements from index x to y-1.

here, x = 2 and, y = 5

Therefore, The output of print(L[2:5]) will be: [6,82 ,5]

Similar questions