Human-facing row numbers often start at one while sequence indexes start at zero. enumerate accepts a display offset directly.
Worked example
print(list(enumerate(['red', 'blue'], start=1)))Result
[(1, 'red'), (2, 'blue')]Implementation notes
The display number depends on the current traversal. Avoid using an enumerated row number as a persistent identifier after sorting or filtering.
Try it yourself
Remove the first item and check whether the numbers are labels or durable IDs.
Open the Python example →Editorial date December 31, 2025 · Published December 6, 2026