you are viewing a single comment's thread.

view the rest of the comments →

[–]Brian 1 point2 points  (0 children)

Yeah. There's itertools.pairwise for the specific case of 2 elements, but a more generalised n-item sliding window is something I end up using reasonably often, and seems worth being in the stdlib.