4 ms·
Slices start at 0, not 1. However they are inclusive of both boundary items. This matches how ranges are specified in Nim.
by vbit 12y ago
Slices start at 0, not 1. However they are inclusive of both boundary items. This matches how ranges are specified in Nim.
- haldean 12y agoSlices in Python are not inclusive of the second index; lst[0:2] gives you a list containing the first two elements.