Learn
Python Lists and Dictionaries
Access by Index

You can access an individual item on the list by its index. An index is like an address that identifies the item’s place in the list. The index appears directly after the list name, in between brackets, like this: list_name[index].

List indices begin with 0, not 1! You access the first item in a list like this: list_name[0]. The second item in a list is at index 1: list_name[1]. Computer scientists love to start counting from zero.

Instructions

1.

Write a statement that prints the result of adding the second and fourth items of the list. Make sure to access the list by index!

Folder Icon

Take this course for free

Already have an account?