The general syntax of slicing
[start:stop:step]
It will be evaluate start:stop-1
and step
(default 1)
>>> l = [x for x in range(5)]
>>> l[0:6]
[0, 1, 2, 3, 4]
>>> l[1:-1] #case second
[1, 2, 3]
>>> l[1:-5] #case third
[]
Why in the case third it returns an empty list and also i don't understand in case second how step can be incremented by 1 if stop value in -ve.