Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.


Operations on Arrays


Accessing Elements

Use the index operator on a list to access values using an index. Note that index values start at 0.

>>> numbers = [1, 2, 3, 4, 5, 6]
>>> numbers[2]

Using an index that is out of bounds of the current range of values results in a runtime error.

>>> numbers[12]
Traceback (most recent call last):
  File "<stdin>", li...