Welcome! Please add a triple backtick fence around your code to make it legible (Please read: make it easier to help you).
Bounds error means you are indexing outside the size of a list.
Welcome! Please add a triple backtick fence around your code to make it legible (Please read: make it easier to help you).
Bounds error means you are indexing outside the size of a list.