On 26/03/2016 16:49, beliav...@aol.com wrote:
I can use x[::n] to select every nth element of a list.

I would use x[n-1::n] if 'nth' means the 3rd element of [10,20,30,40,...] is 30. Otherwise every selection will include the first, no matter what n is.

--
Bartc


--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to