I feel like the " for i in numbers:" part should be iterating through each element in the list. What is actually happening?

Why do I need to have it as this?

```
def total(numbers):
result = 0
for i in range(len(numbers)):
result += numbers[i]
return result
```

Instead of this?

```
def total(numbers):
result = 0
for i in numbers:
result += numbers[i]
return result
```

To be more specific, the latter code gives the error:

IndexError: list index out of range