Trouble with for loop

2007-11-06 Thread Shriphani
Hello, I want to try something like: for (a, b, c, d, e, f) in [1, 2, 3, 4, 5, 6, 7, 8, 9]: When I do that I get an error: TypeError: unpack non-sequence My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How do I go about this ?

Re: Trouble with for loop

2007-11-06 Thread Shriphani
On Nov 6, 3:09 pm, Ant [EMAIL PROTECTED] wrote: On Nov 6, 9:59 am, Shriphani [EMAIL PROTECTED] wrote: ... My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How do I go about this ? It sounds like you are after something like: for

Re: Trouble with for loop

2007-11-06 Thread Amit Khemka
On 11/6/07, Shriphani [EMAIL PROTECTED] wrote: Hello, I want to try something like: for (a, b, c, d, e, f) in [1, 2, 3, 4, 5, 6, 7, 8, 9]: When I do that I get an error: TypeError: unpack non-sequence My main intention is to state that each of the variables namely a, b, c, ## can

Re: Trouble with for loop

2007-11-06 Thread Paul Hankin
Shriphani wrote: Hello, I want to try something like: for (a, b, c, d, e, f) in [1, 2, 3, 4, 5, 6, 7, 8, 9]: When I do that I get an error: TypeError: unpack non-sequence My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How

Re: Trouble with for loop

2007-11-06 Thread Ant
On Nov 6, 9:59 am, Shriphani [EMAIL PROTECTED] wrote: ... My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How do I go about this ? It sounds like you are after something like: for var in (a, b, c, d, e, f): assert var in [1, 2, 3, 4,

Re: Trouble with for loop

2007-11-06 Thread Paul Hankin
On Nov 6, 10:19 am, Shriphani [EMAIL PROTECTED] wrote: On Nov 6, 3:09 pm, Ant [EMAIL PROTECTED] wrote: On Nov 6, 9:59 am, Shriphani [EMAIL PROTECTED] wrote: ... My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How do I go about

Re: Trouble with for loop

2007-11-06 Thread Boris Borcic
Shriphani wrote: On Nov 6, 3:09 pm, Ant [EMAIL PROTECTED] wrote: On Nov 6, 9:59 am, Shriphani [EMAIL PROTECTED] wrote: ... My main intention is to state that each of the variables namely a, b, c, ## can take value from 1 to 9. How do I go about this ? It sounds like you are after something