1.

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

Answer»

-> print(L[2:5]) will return the items from position 2 to 5.

-> Remember that the first item is at position 0, and note that the item in position 5 is NOT included.

So, the output will be [6,82,5]



Discussion

No Comment Found

Related InterviewSolutions