Problem with list slice syntax in python

Posted by Dingle on Stack Overflow See other posts from Stack Overflow or by Dingle
Published on 2010-05-03T20:29:43Z Indexed on 2010/05/03 20:38 UTC
Read the original article Hit count: 229

Filed under:
|
|

The extended indexing syntax is mentioned in python's doc.

slice([start], stop[, step])

Slice objects are also generated when extended indexing syntax is used. For example: a[start:stop:step] or a[start:stop, i]. See itertools.islice() for an alternate version that returns an iterator.

a[start:stop:step] works as described. But what about the second one? How is it used?

© Stack Overflow or respective owner

Related posts about python

Related posts about syntax