negative stride list slices
Peter Hansen
peter at engcorp.com
Wed Sep 1 17:15:51 EDT 2004
More information about the Python-list mailing list
Wed Sep 1 17:15:51 EDT 2004
- Previous message (by thread): negative stride list slices
- Next message (by thread): negative stride list slices
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Reid Nichol wrote: > This was the part that I was refering to: > > +---+---+---+---+---+ > | H | e | l | p | A | > +---+---+---+---+---+ > 0 1 2 3 4 5 > -5 -4 -3 -2 -1 > > Does it not all work the same in practice? Can you explain how the above diagram explains David's example then: >>> s = 'HelpA' >>> s[:-3:-1] 'Ap' I don't find much connection between the diagram and where the -3 is actually slicing either. -Peter
- Previous message (by thread): negative stride list slices
- Next message (by thread): negative stride list slices
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list