[python-nl] Venster over een lijst schuiven

Thomas Miedema thomasmiedema at gmail.com
Sun Oct 17 15:12:06 CEST 2010


for i in range(len(lijst) - 3):
  print lijst[i:i+3]


2010/10/17 Wouter van Heyst <larstiq at larstiq.dyndns.org>

> On Sun, Oct 17, 2010 at 14:41:38 +0200, Geert Stappers wrote:
> > Op 20101017 om 13:35 schreef Dirkjan Ochtman:
> > > 2010/10/17 Geert Stappers <stappers at stappers.nl>:
> > > > Misschien zit het al in Python en weet ik niet hoe het heet.
> > > >
> > > > Wat is de Python naam van "breed venster over lijst schuiven"?
> > >
> > > itertools!
> > >
> > > http://docs.python.org/library/itertools.html
> >
> > Wie wil er wat meer over vertellen?
>
> De voorbeelden in de documentatie herbergen een sliding window
> implementatie, die kan je zo overnemen?
>
> Wouter
> _______________________________________________
> Python-nl mailing list
> Python-nl at python.org
> http://mail.python.org/mailman/listinfo/python-nl
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-nl/attachments/20101017/8261754b/attachment.html>


More information about the Python-nl mailing list