
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

Hello again, Regarding the feedback below, I think I figured out how the variable_name[1:3:5] slice example could work. Please ignore my previous email. Thanks, Ryan Sent from my iPad Begin forwarded message:
From: Ryan Noonan <lifelonglearningtutorials@gmail.com> Date: February 17, 2017 at 9:58:30 PM EST To: docs@python.org Subject: Slice Example in Documentation
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
participants (1)
-
Ryan Noonan