Use enumerate.
```
for idx, obs in enumerate(sc_obsids):
    ...
```