Skip to content

Instantly share code, notes, and snippets.

@bpgergo
Created July 26, 2012 22:15
Show Gist options
  • Save bpgergo/3184921 to your computer and use it in GitHub Desktop.
Save bpgergo/3184921 to your computer and use it in GitHub Desktop.
python sudoku checker
def check_row(row):
return set(row) == set(range(1, len(row)+1))
def check_sudoku(m):
return all(map(check_row, m)) and all(map(check_row, zip(*m)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment