What is a negative index in Python?

Indexing Python sequences in both positive and negative numbers are possible. For the positive index, 0 is the first index, 1 is the second index and so forth. For the negative index, (-1) is the last index and (-2) is the second last index and so forth.

Suggest An Answer

No suggestions avaliable!

Related Interview Questions