old_version/solver.py
def positions_in_one_row_or_column(positions_in_squares) -> Tuple[List[Tuple[int, int]], List[Tuple[int, int]]]:
        """
        Checks how many available blank cells is in each row and collumn.
        If row/column has only one available cell, it can be filled with number.
        :param positions_in_squares:
        :return: list of available blank cells' coordinates, list of black cells' coordinates which can be filled
        """
        potential_positions = list(chain.from_iterable(positions_in_squares.values()))
        rows_count = Counter([p[0] for p in potential_positions])
        columns_count = Counter([p[1] for p in potential_positions])
        solutions = [p for p in potential_positions if rows_count[p[0]] == 1 or columns_count[p[1]] == 1]
        return potential_positions, solutions

        Checks how many available blank cells is in each row and collumn.
        If row/column has only one available cell, it can be filled with number.
        :param positions_in_squares:
        :return: list of available blank cells' coordinates, list of black cells' coordinates which can be filled
        
Checks how many available blank cells is in each row and collumn.
If row/column has only one available cell, it can be filled with number.
Checks how many available blank cells is in each row and collumn . If row / column has only one available cell it can be filled with number .
def positions_in_one_row_or_column(positions_in_squares) -> Tuple[List[Tuple[int, int]], List[Tuple[int, int]]]:
        potential_positions = list(chain.from_iterable(positions_in_squares.values()))
        rows_count = Counter([p[0] for p in potential_positions])
        columns_count = Counter([p[1] for p in potential_positions])
        solutions = [p for p in potential_positions if rows_count[p[0]] == 1 or columns_count[p[1]] == 1]
        return potential_positions, solutions
def positions_in_one_row_or_column ( positions_in_squares ) -> Tuple [ List [ Tuple [ int , int ] ] , List [ Tuple [ int , int ] ] ] : potential_positions = list ( chain . from_iterable ( positions_in_squares . values ( ) ) ) rows_count = Counter ( [ p [ 0 ] for p in potential_positions ] ) columns_count = Counter ( [ p [ 1 ] for p in potential_positions ] ) solutions = [ p for p in potential_positions if rows_count [ p [ 0 ] ] == 1 or columns_count [ p [ 1 ] ] == 1 ] return potential_positions , solutions
Checks how many available blank cells is in each row and collumn.
Checks how many available blank cells is in each row and collumn .
"""
        Checks how many available blank cells is in each row and collumn.
        If row/column has only one available cell, it can be filled with number.
        :param positions_in_squares:
        :return: list of available blank cells' coordinates, list of black cells' coordinates which can be filled
        """
list of available blank cells' coordinates, list of black cells' coordinates which can be filled
list of available blank cells ' coordinates list of black cells ' coordinates which can be filled
positions_in_squares
None