(bo)
| 12 | |
| 13 | |
| 14 | def solve(bo): |
| 15 | find = find_empty(bo) |
| 16 | if not find: |
| 17 | return True |
| 18 | else: |
| 19 | row, col = find |
| 20 | |
| 21 | for i in range(1, 10): |
| 22 | if valid(bo, i, (row, col)): |
| 23 | bo[row][col] = i |
| 24 | |
| 25 | if solve(bo): |
| 26 | return True |
| 27 | |
| 28 | bo[row][col] = 0 |
| 29 | |
| 30 | return False |
| 31 | |
| 32 | |
| 33 | def valid(bo, num, pos): |
no test coverage detected