Refresher on negative indexing in python
July 02, 2024
Friendly reminder regarding python slice notation for negative indexing. It's covered really well here.
Basically, the last value has an index of -1... second last has an index of -2... and so on.
+---+---+---+---+---+---+
| P | y | t | h | o | n |
+---+---+---+---+---+---+
0 1 2 3 4 5
-6 -5 -4 -3 -2 -1 . . .