Re: A question about making a sort-of-counter.

2010-03-30 Thread Chris Rebert
On Tue, Mar 30, 2010 at 2:31 PM, Justin Park wrote: > Suppose I have a list. > a = list() > And suppose allowed digits as the element are 1,2,3,4,5. > > What can I do in order to iterate over all possible values for each element? > For instance, the sequence of the list I want to have would be > [

Re: A question about making a sort-of-counter.

2010-03-30 Thread Justin Park
Thanks! It works! Justin. Chris Rebert wrote: > On Tue, Mar 30, 2010 at 2:31 PM, Justin Park wrote: > >> Suppose I have a list. >> a = list() >> And suppose allowed digits as the element are 1,2,3,4,5. >> >> What can I do in order to iterate over all possible values for each element? >> For i

Re: A question about making a sort-of-counter.

2010-03-30 Thread anon
Justin Park wrote: Suppose I have a list. a = list() And suppose allowed digits as the element are 1,2,3,4,5. What can I do in order to iterate over all possible values for each element? For instance, the sequence of the list I want to have would be [1,1,1,1,1] [1,1,1,1,2] [1,1,1,1,3] [5,

Re: A question about making a sort-of-counter.

2010-03-30 Thread Robert Kern
On 2010-03-30 16:31 PM, Justin Park wrote: Suppose I have a list. a = list() And suppose allowed digits as the element are 1,2,3,4,5. What can I do in order to iterate over all possible values for each element? For instance, the sequence of the list I want to have would be [1,1,1,1,1] [1,1,1,1,2

A question about making a sort-of-counter.

2010-03-30 Thread Justin Park
Suppose I have a list. a = list() And suppose allowed digits as the element are 1,2,3,4,5. What can I do in order to iterate over all possible values for each element? For instance, the sequence of the list I want to have would be [1,1,1,1,1] [1,1,1,1,2] [1,1,1,1,3] [5,5,5,5,4] [5,5,5,5,5]