breaking out of nested loop

Andrew Koenig ark at acm.org
Tue Jul 12 11:27:16 EDT 2005


"rbt" <rbt at athop1.ath.vt.edu> wrote in message 
news:mailman.1657.1121177960.10512.python-list at python.org...

> What is the appropriate way to break out of this while loop if the for
> loop finds a match?

Make it a function and use a "return" statement to break out.





More information about the Python-list mailing list