What is the point of an index? I can’t seem to figure one out.

if we have a list of elements:

x = ['a', 'b', 'c']

we need indexes to get elements from list. This example uses a simple list, but the list could also be a shopping cart with products the user wants to buy

how else are we going to get elements from the list?

1 Like