Steven D'Aprano wrote: >On Sun, 18 Dec 2005 23:36:29 +1100, Steven D'Aprano wrote: > > > >>Python lists aren't linked lists? They are arrays. >> >> > >[slaps head for the stupid typo] >That should have been a full stop, not question mark. Python lists are not >linked lists, period. > > > > All the more inexcusable then, because it's even easier to find the next/previous element in an array! ;)
Thanks all, Bas/Bangt's solutions are very elegant =) -- http://mail.python.org/mailman/listinfo/python-list