Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 8
    "readability counts" The speed difference in the small <1000 range is insignificant. It is 3% slower on an already small time metric. Commented Mar 4, 2017 at 0:08
  • 1
    @user4805123 Whether or not it's "insignificant" depends heavily on the context/use-case. What if there's an outer loop that does this many times? And "readability" can be in the eye of the beholder. The pythonic way (enumerate) will certainly be more readable to many (most?). Commented Oct 31, 2025 at 21:16
  • @8forty agree with your points, 3% might be a "break even" for latency sensitive application. Commented Nov 11, 2025 at 23:18