Loop until condition is true
cyril.bazin at gmail.com
Tue Jun 21 13:39:44 CEST 2005
Another question could be: why is there not a statement "whileTrue" or
It could be an economy of one unuseful test by loop.
On 6/21/05, Magnus Lycka <lycka at carmen.se> wrote:
> Remi Villatel wrote:
> > while True:
> > some(code)
> > if final_condition is True:
> > break
> > #
> > #
> > What I don't find so "nice" is to have to build an infinite loop only to
> > break it.
> This is a common Python idiom. I think you will get used to it.
> > Is there a better recipe?
> final_condition = False
> while not final_condition:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list