just do:
for a in range(2, foo+1):
print a
range(a, b) gives [a, a+1, a+2, ..., b-2, b-1]
bruce schrieb:
> hi..
>
> basic foor/loop question..
>
> i can do:
>
> for a in foo
> print a
>
> if i want to do something like
> for a, 2, foo
> print foo
>
> where go from 2, to foo..
>
>
> Except that in the OP's example foo was a sequence, not an
> integer. I think.
Yes, possibly. But then, what's "from 2 to foo"?
this way it might be
for a in [2] + foo:
print a
--
http://mail.python.org/mailman/listinfo/python-list
http://groups.google.com/group/apydia.
--
Daniel Haus
http://ematia.de
--
http://mail.python.org/mailman/listinfo/python-list
On 30 Nov., 19:46, "Daniel Fetchinson" <[EMAIL PROTECTED]>
wrote:
> You might want to fix the typo in the title tag of the webpage.
>
> Cheers,
> Daniel
That one was really hard to find, now I fixed it. Thank you, Daniel!
--
http://mail.python.org/mailman/listinfo/python-list