On Sat, Nov 4, 2017 at 1:57 PM, Michael Torrie <torr...@gmail.com> wrote: > On 11/03/2017 07:09 PM, Steve D'Aprano wrote: >> On Sat, 4 Nov 2017 06:15 am, Michael Torrie wrote: >> >>> In fact if you have no break you may as well drop the >>> else entirely, because the block will always execute. >> >> That's incorrect. There are multiple ways to exit a loop that will prevent >> the >> `else` block from executing, `break` is only one. > > Such as?
There are many. But other than break, I don't know of any that WOULD execute the next line of code immediately _after_ the loop. ChrisA -- https://mail.python.org/mailman/listinfo/python-list