Juliet C. answered 02/28/23
PhD in Computer Science with 8+ Years of Teaching Experience
The answer to this question relies on understanding how Python slices work. A slice has a start index, a stop index, and optionally a step value, separated by colons inside of square brackets. Negative indexes can be used to go from the right to the left in the sequence (a list in this case). The step value can be used to step over (ignore) certain indexes.
My recommendation: try some slices in the Python interpreter and see what you get.
Reference: https://www.pythontutorial.net/advanced-python/python-slicing/