(bo)
| 113 | |
| 114 | |
| 115 | def next_empty(bo): |
| 116 | # searching for the next 0 on the board |
| 117 | for i in range(len(bo)): |
| 118 | # looping rows |
| 119 | for j in range(len(bo[0])): |
| 120 | # looping columns |
| 121 | if bo[i][j] == 0: |
| 122 | return i, j # returning row and column |
| 123 | |
| 124 | |
| 125 | def solve(bo): |