Mar-03-2021, 05:33 PM
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.
You only want to break the inner loop. You want to let the outer loop run to completion.