Iterating over a list and indexing with the result leads to TypeError
- index
- list
- iterate
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