Re: Iterating Through List or Tuple

2008-07-22 Thread Samir
Fredrik, Marc, Larry -- Thank you all for your very fast and informative replies. I had not come across "itertools" in my search. This group is a great resource. Samir -- http://mail.python.org/mailman/listinfo/python-list

Re: Iterating Through List or Tuple

2008-07-22 Thread Larry Bates
Samir wrote: Is there a way to loop or iterate through a list/tuple in such a way that when you reach the end, you start over at the beginning? For example, suppose I define a list "daysOfWeek" such that: daysOfWeek = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturda

Re: Iterating Through List or Tuple

2008-07-22 Thread Marc 'BlackJack' Rintsch
On Tue, 22 Jul 2008 14:43:10 -0700, Samir wrote: > Is there a way to loop or iterate through a list/tuple in such a way > that when you reach the end, you start over at the beginning? For > example, suppose I define a list "daysOfWeek" such that: > daysOfWeek = ['sunday', 'monday', 'tuesday

Re: Iterating Through List or Tuple

2008-07-22 Thread Fredrik Lundh
Samir wrote: Is there a way to loop or iterate through a list/tuple in such a way that when you reach the end, you start over at the beginning? For example, suppose I define a list "daysOfWeek" such that: daysOfWeek = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturd

Iterating Through List or Tuple

2008-07-22 Thread Samir
Is there a way to loop or iterate through a list/tuple in such a way that when you reach the end, you start over at the beginning? For example, suppose I define a list "daysOfWeek" such that: >>> daysOfWeek = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', >>> 'friday', 'saturday'] If