Unlike most programming languages, Python supports negative indexing. Negative indexing starts from the back of the array.
xs = range(10)
print(xs[-1]) # -> 9
print(xs[-10]) # -> 0This is not exactly modular indexing. The only valid indices i for an arbitrary array xs are -len(xs) ≤ i < len(xs).