Looping in Python
Luke
LLoeffler at home.com
Mon Dec 17 13:18:16 EST 2001
> loop(start=0, stop, step=1):
> (loop.count and loop.value automagically generated by Python,
> loop count starts from 1 and incremented by 1,
> loop value starts from start value and incremented by step value,
> stop value is a long integer)
>
> if condition:
> break
> elif anothercondition:
> continue
> your_statements_and_what_have_you_here
If loop were a function, how would you get the code to be executed into
the function?
Then maybe we could have also: if(condition=None) and
break(loop=thisloop) and continue(loop=thisloop).
L
More information about the Python-list
mailing list