Python List manipulation info

L = [‘yellow’, ‘red’, ‘blue’, ‘green’, ‘black’]

L[1:4] = returns [‘red’, ‘blue’, ‘green’]
L[2:] = returns [‘blue’, ‘green’, ‘black’]
L[:2] = returns [‘yellow’, ‘red’]
L[-1] = returns ‘black’
L[1:-1] = returns [‘red’, ‘blue’, ‘green’]

https://www.pythonforbeginners.com/basics/python-list-manipulation