Search
If we want to fetch values from the end of the list, we can use negative numbers as indices.
In the following code snippet, -1 will return the last element in the list. -2 will return the second last element in the list.
-1
-2