Ditch loop counters, use this instead
Write more pythonic code with enumerate
Even though it is often best to avoid loop counters, there are times when they can be useful.
Fortunately, you don’t have to forget everything you have learnt so far — you can use the
enumerate function. This gives us access to the loop count within a Pythonic for loop.