It prints every yth element from the list / array
>>> a = [1,2,3,4,5,6,7,8,9]
>>> a[::3]
[1, 4, 7]
The additional syntax of a[x::y] means get every yth element starting at position x
ie.
>>> a[2::3]
[3, 6, 9]
It prints every yth element from the list / array
>>> a = [1,2,3,4,5,6,7,8,9]
>>> a[::3]
[1, 4, 7]
The additional syntax of a[x::y] means get every yth element starting at position x
ie.
>>> a[2::3]
[3, 6, 9]