[Pythonmac-SIG] Another odd question re breaks/returns

Bob Ippolito bob at redivi.com
Mon Mar 21 00:02:26 CET 2005

On Mar 20, 2005, at 5:09 PM, Michael Dunn wrote:

>    I have a double-nested 'for' loop in a function.  I can't use 
> 'break' to get out of BOTH loops from the inner loop.  Can I simply 
> put a 'return' statement in the inner loop, or will this completely 
> mess up the stack or something?

return will work fine, assuming that's actually what you want to do...


More information about the Pythonmac-SIG mailing list