old_version/solver.py
def positions_in_one_dimention(square_positions: List[Tuple[int, int]], flag: int) -> Optional[int]:
        """
        If all possible coordinates (for particular number) in square are located in one row or one column,
        that row/column can be deleted from the rest possible coordinates.
        :param square_positions: all possible coordinates in square
        :param flag: 0 for row, 1 for column
        :return: the number of row or column or None
        """
        if len(square_positions) == 1:
            return None
        elements = set([coordinate[flag] for coordinate in square_positions])
        if len(elements) == 1:
            return list(elements)[0]
        else:
            return None

        If all possible coordinates (for particular number) in square are located in one row or one column,
        that row/column can be deleted from the rest possible coordinates.
        :param square_positions: all possible coordinates in square
        :param flag: 0 for row, 1 for column
        :return: the number of row or column or None
        
If all possible coordinates (for particular number) in square are located in one row or one column,
that row/column can be deleted from the rest possible coordinates.
If all possible coordinates ( for particular number ) in square are located in one row or one column that row / column can be deleted from the rest possible coordinates .
def positions_in_one_dimention(square_positions: List[Tuple[int, int]], flag: int) -> Optional[int]:
        if len(square_positions) == 1:
            return None
        elements = set([coordinate[flag] for coordinate in square_positions])
        if len(elements) == 1:
            return list(elements)[0]
        else:
            return None
def positions_in_one_dimention ( square_positions : List [ Tuple [ int , int ] ] , flag : int ) -> Optional [ int ] : if len ( square_positions ) == 1 : return None elements = set ( [ coordinate [ flag ] for coordinate in square_positions ] ) if len ( elements ) == 1 : return list ( elements ) [ 0 ] else : return None
If all possible coordinates (for particular number) in square are located in one row or one column,
that row/column can be deleted from the rest possible coordinates.
If all possible coordinates ( for particular number ) in square are located in one row or one column that row / column can be deleted from the rest possible coordinates .
"""
        If all possible coordinates (for particular number) in square are located in one row or one column,
        that row/column can be deleted from the rest possible coordinates.
        :param square_positions: all possible coordinates in square
        :param flag: 0 for row, 1 for column
        :return: the number of row or column or None
        """
the number of row or column or None
the number of row or column or None
square_positions
List[Tuple[int, int]]
all possible coordinates in square
all possible coordinates in square
flag
int
0 for row, 1 for column
0 for row 1 for column