We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Counting in Programming

In the world of programming, counting is a bit strange!

We don't start counting at 1, we start at 0 instead.

Indexes

Each item in a list has an index that refers to its spot in the list.

Take the following list as an example:

names = ["Bob", "Lane", "Alice", "Breanna"]
  • Index 0: Bob
  • Index 1: Lane
  • Index 2: Alice
  • Index 3: Breanna