title: os.system function will not clear screen
body: <p>I don't know why my screen won't clear.  Instead, I get an arrow pointing to the first letter.  I looked on Google and one source said that it certain circumstances it may return a 0.  Perhaps that is why it is pointing to the first letter of my first string?  There are other problems with my code as well but I've spent a lot of time trying to figure out why this function won't work and I can't figure it out.</p>
  
  <pre><code>import os
  import random
  
  '''
  In this tic-tac-toe game, the user will be prompted to choose a mark.
  The player will play against a computer.
  
  CURRENT PROBLEMS WITH GAME:
  board_tiles and tiles_available do not reset after new game
  clear_screen function does not work
  Error when tie occurs
  '''
  
  board_tiles = [0, 1, 2, 3, 4, 5, 6, 7, 8]
  tiles_available = [0, 1, 2, 3, 4, 5, 6, 7, 8]
  
  
  # create a function that clears the screen
  def clear_screen():
      os.system('cls')
  
  
  # create a function that draws the tic-tac-toe board
  def draw_board():
      # clear screen
      clear_screen()
  
      print(f'{board_tiles[0]} | {board_tiles[1]} | {board_tiles[2]}')
      print('-' * 10)
      print(f'{board_tiles[3]} | {board_tiles[4]} | {board_tiles[5]}')
      print('-' * 10)
      print(f'{board_tiles[6]} | {board_tiles[7]} | {board_tiles[8]}')
  
  
  # create a function that allows the user to choose a piece
  def choose_mark():
      player = input("Would you like to be 'X' or 'O'? ").upper()
      if player == 'X':
          computer = 'O'
      else:
          computer = 'X'
      print(f'Player is {player}.  Computer is {computer}.')
  
      return player, computer
  
  
  # create a function that allows the computer to make a random move on the board
  def computer_move(computer):
      computers_move = random.choice(tiles_available)
      tiles_available.remove(computers_move)
      board_tiles.insert(computers_move, computer)
      board_tiles.remove(computers_move)
  
      return computers_move
  
  
  # create a function that checks if the chosen spot is available and draws it to the board
  def draw_mark(player, computer):
      while tiles_available:
          players_move = int(input('Where would you like to move? '))
          if players_move in tiles_available:
              tiles_available.remove(players_move)
              board_tiles.insert(players_move, player)
              board_tiles.remove(players_move)
              computer_move(computer)
              draw_board()
              score()
          else:
              print('{players_move} has already been taken')
  
      return player
  
  
  # define what is a win/lose/tie
  def score():
      if board_tiles[0] == board_tiles[1] == board_tiles[2] or \
          board_tiles[3] == board_tiles[4] == board_tiles[5] or \
          board_tiles[6] == board_tiles[7] == board_tiles[8] or \
          board_tiles[0] == board_tiles[3] == board_tiles[6] or \
          board_tiles[1] == board_tiles[4] == board_tiles[7] or \
          board_tiles[2] == board_tiles[5] == board_tiles[8] or \
          board_tiles[0] == board_tiles[4] == board_tiles[8] or \
          board_tiles[2] == board_tiles[4] == board_tiles[6]:
          print('YOU WIN!!!')
          play_again()
  
      if len(tiles_available) == 0:
          print('It is a tie!')
          play_again()
  
  
  def play_again():
      replay = input("Would you like to play again? \n"
                     "Type 'y' for yes and 'n' for no: ").lower()
      if replay == 'y':
          game()
      else:
          print('Come back!')
          quit()
  
  
  def game():
      playing = True
      player, computer = choose_mark()
      while playing:
          draw_board()
          draw_mark(player, computer)
  
  game()
  </code></pre>