1a[-1] # last item in the array
2a[-2:] # last two items in the array
3a[:-2] # everything except the last two items
4
1# array[start:stop:step]
2
3# start = include everything STARTING AT this idx (inclusive)
4# stop = include everything BEFORE this idx (exclusive)
5# step = (can be ommitted) difference between each idx in the sequence
6
7arr = ['a', 'b', 'c', 'd', 'e']
8
9arr[2:] => ['c', 'd', 'e']
10
11arr[:4] => ['a', 'b', 'c', 'd']
12
13arr[2:4] => ['c', 'd']
14
15arr[0:5:2] => ['a', 'c', 'e']
16
17arr[:] => makes copy of arr
1a[::-1] # all items in the array, reversed
2a[1::-1] # the first two items, reversed
3a[:-3:-1] # the last two items, reversed
4a[-3::-1] # everything except the last two items, reversed
5