Answer :

-1  is the first negative index in a string.

What is positive and negative index?

To recap, Python supports positive zero-based indexing and negative indexing that starts from -1. Negative indexing in Python means the indexing starts from the end of the alterable. The last element is at index -1, the second last at -2, and so on.

What is negative indexing string?

If an index number in a slice is out of bounds, it is ignored and the slice uses the start or end of the string. Negative Index As an alternative, Python supports using negative numbers to index into a string: -1 means the last char, -2 is the next to last, and so on.

To learn more about index number, refer

https://brainly.com/question/20713481

#SPJ4

Other Questions