What are negative indexes and why are they used?

Last updated 3 years, 4 months ago | 1379 views 75     5

Tags:- Python

Negative indexes mean that you count from the right instead of the left. So, list[-1] refers to the last element, list[-2] is the second-last, and so on.