Skip to main content

sudsoln

Build Status codecov

A n ** 2-by-n ** 2 sudoku solver.

Installation

To install, type:

pip install sudsoln

To update, type:

pip install sudsoln --upgrade

A very brief introduction to sudsoln

import sudsoln as ss
eg = '6.5..7..1.1..2..5......6..33.2.......4.....8.......9.52..9......6..1..2.5..3..7.6'
eg = ss.to_sudoku(eg)
eg
#> Sudoku(
#>     6    .    5    |    .    .    7    |    .    .    1
#>     .    1    .    |    .    2    .    |    .    5    .
#>     .    .    .    |    .    .    6    |    .    .    3
#> -------------------+-------------------+-------------------
#>     3    .    2    |    .    .    .    |    .    .    .
#>     .    4    .    |    .    .    .    |    .    8    .
#>     .    .    .    |    .    .    .    |    9    .    5
#> -------------------+-------------------+-------------------
#>     2    .    .    |    9    .    .    |    .    .    .
#>     .    6    .    |    .    1    .    |    .    2    .
#>     5    .    .    |    3    .    .    |    7    .    6
#> n: 3
#> elements: 1, 2, 3, 4, 5, 6, 7, 8, 9
#> empty: .
#> )
eg.solve()
#> ('0:00:00.086731', 0)
eg
#> Sudoku(
#>     6    3    5    |    8    9    7    |    2    4    1
#>     8    1    9    |    4    2    3    |    6    5    7
#>     7    2    4    |    1    5    6    |    8    9    3
#> -------------------+-------------------+-------------------
#>     3    5    2    |    6    8    9    |    1    7    4
#>     9    4    6    |    5    7    1    |    3    8    2
#>     1    8    7    |    2    3    4    |    9    6    5
#> -------------------+-------------------+-------------------
#>     2    7    1    |    9    6    5    |    4    3    8
#>     4    6    3    |    7    1    8    |    5    2    9
#>     5    9    8    |    3    4    2    |    7    1    6
#> n: 3
#> elements: 1, 2, 3, 4, 5, 6, 7, 8, 9
#> empty: .
#> )
eg.is_valid_answer()
#> True

Release files for sudsoln 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sudsoln 0.1.0
File Size Uploaded
sudsoln-0.1.0.tar.gz 35.7 kB Details

Release files / sudsoln-0.1.0.tar.gz

Download URL sudsoln-0.1.0.tar.gz
Size 35.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0a98e6824b1bdbcc3cfe858d7f864ed9f7d4f88d483718cdb0487b0f4888f026
BLAKE2b-256 checksum
How to use checksums
10579f14f7c280abf19b338dfabb34c27d886cb59b0847503694ca38feebd408
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.24.0 CPython/3.7.2

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page