What is a negative index in Python?
In Python, the negative index is used to index by starting from the last element in a list, tuple, or any other container class which supports indexing. Here, (-1) points to the previous index, -2 to the second last index and similarly.
Suggest An Answer
No suggestions Available!