For instance, if you have the following (random example):
w = input("Enter width")
h = input("Enter height")
for x in range(0,w):
for y in range(0,h):
print x,y
if (raw_input("Stop? y/n") == "y"):
break
That would only break out of the y loop. You could introduce another variable, and change the loop to more or less this form:
for x in range(0,w):
for y in range(0,h):
print x,y
stop = raw_input("Stop? y/n")
if stop == "y":
break
if stop == "y":
break
But that's pretty ugly, and there are a few cases where it could get very complicated, and you'd need to introduce a flag. Instead, is there any way to tell the break to break out of two levels instead of just one?