Slicing with negative strides

Steven D'Aprano steve+comp.lang.python at
Mon Nov 4 16:18:31 CET 2013

On Mon, 04 Nov 2013 00:15:40 +0100, Martin Manns wrote:

> On 29 Oct 2013 05:22:00 GMT
> Steven D'Aprano <steve at> wrote:
>> Does anyone here use slices (or range/xrange) with negative strides
>> other than -1?
> I have used negative strides for comparing discrete sequences e. g. for
> turbulence analysis, and I hope that my code will still run in Python 4.

Can you show us a typical example of how you would normally use such 
negative strides?



More information about the Python-list mailing list