How to label loops?
Emile van Sebille
emile at fenx.com
Sun Feb 11 14:28:03 EST 2001
for i in range(10):
for j in range(10):
breakOuter = 0
if i == 3 and j == 3:
breakOuter = 1
break
if breakOuter:
break
print i , j
HTH,
--
Emile van Sebille
emile at fenx.com
-------------------
"Zamurai" <zamurai at gmx.net> wrote in message
news:981916280.1465025599 at news.t-online.de...
"Steve Holden" <sholden at holdenweb.com> wrote:
> First, convince me that loops need labelling!
>
> regards
> Steve
> --
> --
> Tools, training and technology to help you meet your
information needs
>
>
>
> "Zamurai" <zamurai at gmx.net> wrote in message
> news:981845104.329821352 at news.t-online.de...
for example:
while 1: # first loop
while 1: # second loop
break
this break breaks only out of the first loop, but what, if i
want to break out
of the first loop, while i´m in the second one?
More information about the Python-list
mailing list