Python is a language which also works on the negative index.Example:s="Mystring"print(s[0]) // Mprint(s[-1]) // gprint(s[-2]) // nIt work same on list also.
Example:
s="Mystring"
print(s[0]) // M
print(s[-1]) // g
print(s[-2]) // n
It work same on list also.