for i in range(len(lijst) - 3): print lijst[i:i+3]
2010/10/17 Wouter van Heyst <lars...@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 <stapp...@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@python.org > http://mail.python.org/mailman/listinfo/python-nl >
_______________________________________________ Python-nl mailing list Python-nl@python.org http://mail.python.org/mailman/listinfo/python-nl