1.

What is a negative index in Python?

Answer»

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.



Discussion

No Comment Found