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 indices begin with 0, not 1! You access the first item in a list like this:
list_name. The second item in a list is at index 1:
list_name. Computer scientists love to start counting from zero.
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!
Take this course for free