How does string or list slicing work?
- extract
- slicing
- string
- list
- slice
- extraction
a = "This is a string"
a[start:stop] # items start through stop-1
a[start:] # items start through the rest of the array
a[:stop] # items from the beginning through stop-1
a[:] # a copy of the whole array
a[start:stop:step] # items start through stop-1, by step