CBSE Class 12 Computer Science
Question 57 of 105
Python Revision Tour II — Question 6
Back to all questionsa[x:y] returns a slice of the sequence from index x to y - 1. So, a[1 : 1] will return an empty list irrespective of whether the list has two elements or less as a slice from index 1 to index 0 is an invalid range.