# Enumerate list / get index in for loop

> Iterate over a Python list while accessing each item's index and value.

- Canonical: https://preview.arshadmehmood.com/today-i-learned/python/enumerate-list/
- Section: python
- Author: Arshad Mehmood

```python
for idx, val in enumerate(list):
    print(idx, val)
```

