Skip to content

Instantly share code, notes, and snippets.

View amikrop's full-sized avatar

Aristotelis Mikropoulos amikrop

View GitHub Profile
def same_row(x, y, grid):
for j in xrange(9):
if j != y and grid[x][j] != '0':
yield grid[x][j]
def same_column(x, y, grid):
for i in xrange(9):
if i != x and grid[i][y] != '0':
yield grid[i][y]