tictactoe.py
def terminal(board):
    """
    Returns True if game is over, False otherwise.
    """

    # Get status
    empty_places = sum(1 for i in board for j in i if j == None)
    won = winner(board)

    # Check if won or board full
    if won or not empty_places:
        return True
    return False

    Returns True if game is over, False otherwise.
    
Returns True if game is over, False otherwise.
Returns True if game is over False otherwise .
def terminal(board):
    empty_places = sum(1 for i in board for j in i if j == None)
    won = winner(board)
    if won or not empty_places:
        return True
    return False
def terminal ( board ) : empty_places = sum ( 1 for i in board for j in i if j == None ) won = winner ( board ) if won or not empty_places : return True return False
Returns True if game is over, False otherwise.
Returns True if game is over False otherwise .
"""
    Returns True if game is over, False otherwise.
    """ # Get status # Check if won or board full
board