Because [2:3]
is from 4 to the next ele - 1, which returns 4.
Slicing never raises an error. The least it can do is return an empty list/tuple/string (depending on the type of course):
>>> a[12312312:]
[]
[start:end:step]
So index 2 is 4
, then end - 1
is index 2 which is 4
.