[docs] Slice Example in Documentation

Ryan Noonan lifelonglearningtutorials at gmail.com
Fri Feb 17 21:58:30 EST 2017


Hello,

In the Python documentation for slice the following definition is given:
slice - An object usually containing a portion of a sequence. A slice is created using the subscript notation, [] with colons between numbers when several are given, such as in variable_name[1:3:5]. The bracket (subscript) notation uses slice objects internally.

If variable_name[1:3:5] = [start:stop:step]

How can you step or stride by 5 through a smaller number (slice of 1:3)?

Maybe this is a documentation error. If not, I apologize. I could not make sense of it.

Thanks,

Ryan

Sent from my iPad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20170217/6c163f96/attachment-0001.html>


More information about the docs mailing list