a[:-3:-1] # the last two items, reversed
a[-3::-1] # everything except the last two items, reversed
I don’t understand how these two slicing is taking place. For the first command you see, the first element is not given. So ideally it should begin from the beginning, but it does not. It is printing the last two elements in reverse.
For the second if you see -3 means it is referring to the third element form the end, but the slicing is from the beginning. I am totally stuck and cannot figure out why.