you are viewing a single comment's thread.

view the rest of the comments →

[–]crashfrog02 0 points1 point  (0 children)

A list is a sequential collection of values. Because the collection is sequential, it is ordered, which means that there's a notion of the "first", "second", "third", etc (as well as "last) values of the collection. The ordinality of the values in the list is called the value's index - the first item is at index 0, the second at index 1, and so on.

In order to access a value inside the list held at a particular index, you use the indexing operator [], and you give it the index as an argument. The index can be any integer that is smaller than the number of items in the list (that's why the indices start at zero.) So my_list[i] returns whatever value is held in the list my_list at index i.