List indexing is a foundational tool for working with lists. It allows one to access items from a list by specifying the item according to its location within the list. The item location is represented the number within brackets. In a list index, the count starts at 0, so the first item is accessed by list[0]
and the second item by list[1]
, the third item by list[2]
, and so on.
- Check out this article about list indexing on Medium, which also covers slicing lists.