Agreed the indexing logic isn't right. Negative values index backwards from the end of the string (-1 being the last character, etc.) In this case, the index of 0 and -4 are the same character (3), etc, so it would look like so:
3 0 . 0
0 1 2 3 (positive index numbers)
-4 -3 -2 -1 (negative index numbers)
I got the answer wrong, but then I looked into it because I was curious to understand it. I'm a bit of a newbie with Python so I ran some different strings through this code in my interpreter to make sure I understood it.
Regardless, thanks for the cool exercise.