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