Lists and Indexing
Lists
A list defines a sequence of ordered objects (integers, floats, strings, and so on). They can be defined with comma-separated values between square brackets.Indexing
Indexing means the fetching of a single value from the list. This is a 0-based indexing scheme: the first item sits at index 0, the second at index 1, and so on.| index | 0 | 1 | 2 | 3 | 4 |
|---|---|---|---|---|---|
| value | 2 | 3 | 5 | 7 | 11 |
| negative index | -5 | -4 | -3 | -2 | -1 |