Given:
li = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h']
Why does print(li[-5:0])
not print [d, b, c]
?
-5 is the beginning and 0 is the end, so, why does print(li[-5:0])
print an empty list?
Shouldn't print statement start from d which is -5 and go through until 0+1 which is c?