I'm a bit confused about slicing a list and the numbering here.
Python tends to start from 0 instead of 1, and it's shown below to work in that way well enough. But if we're starting from 0, and going until 3, why am I not getting exam
instead of exa
? After all, 0 - 3 is 4 numbers.
>>> test = "example string"
>>> print test[:3]
exa
>>> print test[0:3]
exa
>>> print test[1:3]
xa