• iterate
  • index
  • list

The OP iterates over a list, thinking this provides the indices of the list. Attempting to get the elements by indexing then fails:
python
for i in some_list: # <<< wrong assumption
value = some_list[i] # <<< actual error