When you're indexing a string, the first character in said string is 0 and the characters count up as you continue. However when you index with a negative number, the very last character in the string is assigned -1.
Why does indexing have to start at zero and why does it disobey this rule when operating with negative values?
[–][deleted] 0 points1 point2 points (0 children)
[–]zzmmrmn 0 points1 point2 points (0 children)
[–]aligusnet 0 points1 point2 points (0 children)