for loop question

York yorklee70 at gmail.com
Thu Jul 6 19:45:08 EDT 2006


for a in range(2, len(foo)): print a

or maybe you need
for a in range(1, len(foo)): print a
?

York


bruce wrote:
> 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..
> 
> i can't figure out how to accomplish this... 
> 
> can someone point me to how/where this is demonstrated...
> 
> found plenty of google for for/loop.. just not this issue..
> 
> thanks
> 
> -bruce
> 



More information about the Python-list mailing list