Python Forum
How to break out of nested loops
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to break out of nested loops
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

Possibly Related Threads…
Thread Author Replies Views Last Post
  Break out of nested loops muzikman 11 979 Sep-18-2021, 12:59 PM
Last Post: muzikman
  Nested for Loops sammay 1 789 Jan-09-2021, 06:48 PM
Last Post: deanhystad
  How to make this function general to create binary numbers? (many nested for loops) dospina 4 1,517 Jun-24-2020, 04:05 AM
Last Post: deanhystad
  Conditionals, while loops, continue, break (PyBite 102) Drone4four 2 1,248 Jun-04-2020, 12:08 PM
Last Post: Drone4four
  Python beginner - nested while loops mikebarden 1 894 Jun-01-2020, 01:04 PM
Last Post: DPaul
  best way out of nested loops? Skaperen 7 1,898 May-30-2020, 05:20 PM
Last Post: Skaperen
  alternative to nested loops for large data set JonnyEnglish 2 1,167 Feb-19-2020, 11:26 PM
Last Post: JonnyEnglish
  Nested for loops d79danny 8 2,124 Oct-05-2019, 02:12 AM
Last Post: newbieAuggie2019
  Printing out a triangle using nested for loops MrGoat 12 3,774 Jan-16-2019, 07:21 PM
Last Post: ichabod801
  Looping and nested loops albry 5 2,460 Dec-20-2018, 12:10 PM
Last Post: buran

Forum Jump:

User Panel Messages

Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020