Example & Tutorial understanding programming in easy ways.

What is negative index in Python ?

Python is a language which also works on the negative index.


Example:

s="Mystring"

print(s[0])  //  M

print(s[-1])  // g

print(s[-2])  // n


It work same on list also.

Read More →