If you want to break out of a loop in Python, just use "break". How about when you need to bread out of more than 2 loops in Python? Here is a hint: Using Raise and Exception. try: ... if (condition) : #You want to break your loop here raise GetOutOfLoop except GetOutOfLoop: pass
The most important questions of life are, for the most part, really only problems of probability ~ Laplace