It's a very simple thing and well explained from ASCII art diagram for how slices work
+---+---+---+---+---+---+
| P | y | t | h | o | n |
+---+---+---+---+---+---+
0 1 2 3 4 5 6
-6 -5 -4 -3 -2 -1
think the indices as pointing between characters, see the left edge above as it's pointing at first character numbered 0. Then at the right edge of last character of a string of n characters has index n.
You can look into the Python help section for reference .
Happy Learning, Cheers..!!