SyntaxFix
Write A Post
Hire A Developer
Questions
Negative numbers 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.
list[-1]
list[-2]