I think something is not right


#1


#2

I can’t see anything wrong. The .slice() method takes a slice (or section) from an array. The first parameter is the index of the first element taken (start counting from 0). The second parameter is the index where you stop taking elements. If you had a list and made 2 cuts, the numbers would be the element just to the right of each cut.

A list of 5 elements:
0 1 2 3 4

slice(1,3):
0|1 2|3 4

The slice gives you:
1 2

–Frankie


#3

thank you for explanation. i did not consider first element equals 0. looks ok now. cheers
jezior groźny