This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import itertools | |
from copy import deepcopy | |
def possible_combinations(values, n, total): | |
# generate all combinations of given values with given sum | |
return [combination for combination in itertools.combinations(values, n) if sum(combination) == total] | |
def make_aval(board, clues): | |
""" | |
Generates a set of all digits you can use in each cell, just like you do in sudoku board |