https://github.com/sekthor/sudoku-solver
A very simple method to solve sudokus automatically
https://github.com/sekthor/sudoku-solver
sudoku sudoku-solver
Last synced: 2 months ago
JSON representation
A very simple method to solve sudokus automatically
- Host: GitHub
- URL: https://github.com/sekthor/sudoku-solver
- Owner: sekthor
- Created: 2021-02-23T18:46:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-23T18:46:50.000Z (about 4 years ago)
- Last Synced: 2025-01-16T12:52:21.209Z (4 months ago)
- Topics: sudoku, sudoku-solver
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Sudoku Solver
Simple Sudoku Solver written in python.
A fun little project I have wanted to do a while now.## Usage
Import the module.
```python
from sudoku import *
```A sudoku is constructed from a 9x9 list containing numbers from `1-9` or `0` for empty fields.
```python
s1 = [
[6,0,9,4,0,0,0,3,0],
[2,0,0,6,0,0,0,1,0],
[0,4,0,0,0,2,0,7,0],
[0,0,4,5,0,0,7,0,0],
[7,0,0,8,0,9,0,0,6],
[0,0,5,0,0,3,2,0,0],
[0,1,0,2,0,0,0,6,0],
[0,7,0,0,0,6,0,0,8],
[0,9,0,0,0,4,5,0,3]
]sudoku = Sudoku(s1)
```Instanciate SodukuSolver with Sudoku and call the solve method.
```python
solver = SudokuSolver(sudoku)
solver.solve()
```