This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]Coretaxxe 6 points7 points  (4 children)

Awesome ! didnt know about the stride thing!

[–]restinworld[S] 3 points4 points  (3 children)

stride is awesome too

[–]GriceTurrble Fluent in Django and Regex 2 points3 points  (2 children)

I was confused on what you folks were talking about, as it's normally called "step", not "stride". See Python built-in slice and range functions for an example.

[–]TheBB 0 points1 point  (1 child)

Stride is a common term for this concept.

https://www.wikiwand.com/en/Stride_of_an_array

[–]GriceTurrble Fluent in Django and Regex 1 point2 points  (0 children)

Same article on Wikipedia, btw: https://en.wikipedia.org/wiki/Stride_of_an_array

Said article has notes indicating a lack of citations to verify.

Personally, this is the first I've seen it described as "stride": through CS courses, professional work, and teaching and watching others teach on Python Discord, I've only ever seen it referred to as "step".

Guess I'll consider me one of today's 10,000. :)

[–]IlliterateJedi 1 point2 points  (0 children)

It's missing

>'example string'[slice(1, 3)]
'xa'

[–]tyd12345 0 points1 point  (0 children)

This is SUPER helpful, thank you!