![]() A negative list index begins at -1, allowing you to retrieve the last item of a list.ĭata within a list using list slicing. A positive index begins at position 0, meaning the first item. We can see here that Python lists have both a positive index as well as a negative index. ![]() This means that we can access an item, or a range of items, by its index. One of the many wonderful properties of lists is that they are ordered.
0 Comments
Leave a Reply. |