Python Forum

Full Version: How to break out of nested loops
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Maybe there is a misunderstanding. The outer loop does not iterate from 0 to 8 (are you sure that shouldn't be range(10) to do the numbers 0 through 9?) The outer loop iterates from 0 to 3. The inner loop iterates from 0 through 8, and each time you find a digit in the inner loop and break, it will start over from 0.

You only want to break the inner loop. You want to let the outer loop run to completion.
Your absolutely right thank you kindly, the issue was with my code timing.
stupid mistake, but you helped me identify it.. Thumbs Up
Pages: 1 2