Stupid bug caused because I didn’t remember this very simple fact! Suppose we have a list:
mylist = [1,2,3,4,5]
And we want to slice only the first two elements: [1,2].
will actually only give us this:
If we want to print the first two elements, we need to write
and then we get
because Python always selects the last index minus 1.