seq_along

seq_along(x)

Return 0-based indices along x, like R’s seq_along() but Python-indexed.