Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
1 of 4
Raman

I personally think about it like a for loop

a[start:end:step]    
# for(i = start; i < end; i += step)

Also note that negative values for start and end are relative to the end of the list.

Raman