Re: Loops and things

2007-12-15 Thread ZeD
Jair Trejo wrote: > I was wondering how and if it's possible to write a > loop in python > which updates two or more variables at a time. For > instance, something > like this in C: > > for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { > printf("i = %d, j = %d\n", i, j); > } >>> for i,j in z

Re: Loops and things

2007-12-14 Thread Jair Trejo
I was wondering how and if it's possible to write a loop in python which updates two or more variables at a time. For instance, something like this in C: for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { printf("i = %d, j = %d\n", i, j); } So that I would get: i = 0, j = 0 i = 1, j = 1 i = 2

Re: Loops and things

2007-12-14 Thread i . pantusa
On Dec 14, 5:01 pm, Neil Cerutti <[EMAIL PROTECTED]> wrote: > On 2007-12-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > > I was wondering how and if it's possible to write a loop in python > > which updates two or more variables at a time. For instance, something > > like this in C: > > >

Re: Loops and things

2007-12-14 Thread Neil Cerutti
On 2007-12-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I was wondering how and if it's possible to write a loop in python > which updates two or more variables at a time. For instance, something > like this in C: > > for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { > printf("i = %d, j =

Re: Loops and things

2007-12-14 Thread Tim Chase
> I was wondering how and if it's possible to write a loop in python > which updates two or more variables at a time. For instance, something > like this in C: > > for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { > printf("i = %d, j = %d\n", i, j); > } Well, yes it can be done, but depending

Re: Loops and things

2007-12-14 Thread Gary Herron
[EMAIL PROTECTED] wrote: > I was wondering how and if it's possible to write a loop in python > which updates two or more variables at a time. For instance, something > like this in C: > > for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { > printf("i = %d, j = %d\n", i, j); > } > > So that I wo

Re: Loops and things

2007-12-14 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : > I was wondering how and if it's possible to write a loop in python > which updates two or more variables at a time. For instance, something > like this in C: > > for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { > printf("i = %d, j = %d\n", i, j); > } > > So that

Loops and things

2007-12-14 Thread rocco . rossi
I was wondering how and if it's possible to write a loop in python which updates two or more variables at a time. For instance, something like this in C: for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { printf("i = %d, j = %d\n", i, j); } So that I would get: i = 0, j = 0 i = 1, j = 1 i = 2

Loops and things

2007-12-14 Thread rocco . rossi
I was wondering how and if it's possible to write a loop in python which updates two or more variables at a time. For instance, something like this in C: for (i = 0, j = 10; i < 10 && j < 20; i++, j++) { printf("i = %d, j = %d\n", i, j); } So that I would get: i = 0, j = 0 i = 1, j = 1 i = 2