old_version/solver.py
def delete_unavailable_coordinates(element: int, flag: int, positions_in_squares: Dict[int, List[Tuple[int, int]]],
                                       square: int) -> None:
        """
        Get all potential (for insertion) blank cells' coordinates and deletes non-valid coordinates.
        Non-valid coordinates are ones that number MUST be inserted in the same row/column but in another square.
        :param element: number of row or column
        :param flag: 0 for row, 1 for column
        :param positions_in_squares: list of available blank cells' coordinates divided by squares
        :param square: number of square where number must be inserted
        :return: updated list of available blank cells' coordinates divided by squares
        """
        if element:
            for square_number in positions_in_squares:
                if square_number == square:
                    continue
                positions_in_squares[square_number] = [
                    coordinate for coordinate in positions_in_squares[square_number] if coordinate[flag] != element]
        return None

        Get all potential (for insertion) blank cells' coordinates and deletes non-valid coordinates.
        Non-valid coordinates are ones that number MUST be inserted in the same row/column but in another square.
        :param element: number of row or column
        :param flag: 0 for row, 1 for column
        :param positions_in_squares: list of available blank cells' coordinates divided by squares
        :param square: number of square where number must be inserted
        :return: updated list of available blank cells' coordinates divided by squares
        
Get all potential (for insertion) blank cells' coordinates and deletes non-valid coordinates.
Non-valid coordinates are ones that number MUST be inserted in the same row/column but in another square.
Get all potential ( for insertion ) blank cells ' coordinates and deletes non - valid coordinates . Non - valid coordinates are ones that number MUST be inserted in the same row / column but in another square .
def delete_unavailable_coordinates(element: int, flag: int, positions_in_squares: Dict[int, List[Tuple[int, int]]],
                                       square: int) -> None:
        if element:
            for square_number in positions_in_squares:
                if square_number == square:
                    continue
                positions_in_squares[square_number] = [
                    coordinate for coordinate in positions_in_squares[square_number] if coordinate[flag] != element]
        return None
def delete_unavailable_coordinates ( element : int , flag : int , positions_in_squares : Dict [ int , List [ Tuple [ int , int ] ] ] , square : int ) -> None : if element : for square_number in positions_in_squares : if square_number == square : continue positions_in_squares [ square_number ] = [ coordinate for coordinate in positions_in_squares [ square_number ] if coordinate [ flag ] != element ] return None
Get all potential (for insertion) blank cells' coordinates and deletes non-valid coordinates.
Get all potential ( for insertion ) blank cells ' coordinates and deletes non - valid coordinates .
"""
        Get all potential (for insertion) blank cells' coordinates and deletes non-valid coordinates.
        Non-valid coordinates are ones that number MUST be inserted in the same row/column but in another square.
        :param element: number of row or column
        :param flag: 0 for row, 1 for column
        :param positions_in_squares: list of available blank cells' coordinates divided by squares
        :param square: number of square where number must be inserted
        :return: updated list of available blank cells' coordinates divided by squares
        """
updated list of available blank cells' coordinates divided by squares
updated list of available blank cells ' coordinates divided by squares
element
int
number of row or column
number of row or column
flag
int
0 for row, 1 for column
0 for row 1 for column
positions_in_squares
Dict[int, List[Tuple[int, int]]]
list of available blank cells' coordinates divided by squares
list of available blank cells ' coordinates divided by squares
square
int
number of square where number must be inserted
number of square where number must be inserted