Slicing with negative strides

Mark Lawrence breamoreboy at yahoo.co.uk
Tue Oct 29 04:54:34 EDT 2013


On 29/10/2013 05:22, Steven D'Aprano wrote:
> Does anyone here use slices (or range/xrange) with negative strides other
> than -1?
>
> E.g. sequence[2:15:-3]
>

In 10 ish years I don't recall ever considering it, let alone doing it.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence




More information about the Python-list mailing list