string[i:j:k]

Terry Reedy tjreedy at udel.edu
Tue Jul 22 18:28:29 CEST 2008



konstantin wrote:
> Hello,
> I'm not a newbie in python, but recently faced a problem in simple
> expression:
> some_string[i:j:k]
> What does it mean? I believe this  grammar (http://docs.python.org/ref/
> slicings.html) describes the syntax. But I can't grasp it.

When you post a link, please put it on one line by itself, like this:
http://docs.python.org/ref/slicings.html
so it will be clickable as a whole by modern newsreaders.

Experimenting with bits of code in the interactive interpreter (or IDLE, 
which is easier to cut from), like the responders did, is a great way to 
learn.




More information about the Python-list mailing list