input: 
  def play_tictactoe():
      """ Start and control the flow of a TicTacToe game. The function initializes the game, 
      displays the board, allows players to place their marks, checks for a win, and
      alternates turns between 'x' and 'o'.
      >>> play_tictactoe()
      X - -
      - O -
      - - X
      False
      >>> play_tictactoe()
      X X X
      - O -
      O - -
      True
      """
  
output:     board = [['-' for _ in range(3)] for _ in range(3)]
      current_player = 'X'
      
      def print_board():
          for row in board:
              print(' '.join(row))
      
      def check_win():
          for row in board:
              if row[0] == row[1] == row[2] != '-':
                  return True
          for col in range(3):
              if board[0][col] == board[1][col] == board[2][col] != '-':
                  return True
          if board[0][0] == board[1][1] == board[2][2] != '-':
              return True
          if board[0][2] == board[1][1] == board[2][0] != '-':
              return True
          return False
      
      def place_mark(row, col):
          if board[row][col] == '-':
              board[row][col] = current_player
              return True
          return False
      
      while True:
          print_board()
          row, col = map(int, input(f"Player {current_player}, enter your move (row col): ").split())
          if place_mark(row, col):
              if check_win():
                  print_board()
                  print(True)
                  return
              current_player = 'O' if current_player == 'X' else 'X'
          else:
              print("Invalid move, try again.")