954,541 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Sudokue checker

I am trying to create a sudoku checker as my second project. Its not going well :D. So far i've got it to check for rows that are 9 digits in length - i'm not sure if that's correct..

puzzle = []

row = raw_input()
while row:
  puzzle.append(row)
  row = raw_input()

for row in xrange(9):
  seen = {}
  for column in xrange(9):
    digit = puzzle[column][row]
    if digit in seen:
      print 'duplicate', digit, 'in row', row
    else:
      seen[digit] = 1


I want it to check for columns and 3x3 grids effectively, someone PLEASE HELP

freeze131
Newbie Poster
5 posts since Sep 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: