Real Python

Try It Yourself: Get the code examples you need to drop manual counters from your loops with enumerate().

Almost there! Complete this form and click the button below to gain instant access:

Python enumerate(): Simplify Looping With Counters

Write Loops That Count Without Extra Bookkeeping

🔒 No spam. We take your privacy seriously.

© 2012–2026 Real Python ⋅ Privacy Policy

Advertisement
Advertisement