python for with double test

Peter Hansen peter at engcorp.com
Fri Dec 30 12:13:24 EST 2005


borges2003xx at yahoo.it wrote:
> hi all
> the is a way for doing  a for with double test:
>    example
>          for i in range(0,10) and f==1:
>               ........

Not sure if you're asking a question, but is this what you are trying to 
do? :

    if f == 1:
        for i in range(0,10):
            ...

If not, please explain more carefully what you want, maybe with an 
example showing more than "..." in the body so we'll understand better.

-Peter




More information about the Python-list mailing list