title: How to print Tic-Tac-Toe game board?
body: <p>I am trying to print the board for Tic-Tac-Toe game. When I try to run it nothing happens and it says there is invalid syntax. The invalid syntax says that it is some were in my <code>printboard</code> function.</p>
  
  <p>I don't see what is wrong with my code.</p>
  
  <p>How can I make it print the board?</p>
  
  <pre><code>#Tic-Tac-Toe Game
  
  import os
  import time
  import random
  
  
  board = [" " for x in range(10)]
  
  def printTitle():
      print"""
  
  ----------------     1 | 2 | 3
  TIC - TAC - TOE      4 | 5 | 6
  ________________     7 | 8 | 9
  
  TO PLAY TIC - TAC - TOE, YOU NEED TO GET THREE IN A ROW.
  YOUR CHOICES ARE BETWEEN 1 TO 9.
  
  """
  
  def printBoard():
      print ( "   |   |   ")
      print (" "+board[1]+" | "+board[2]+" | "+board[3]+"  ")
      print ("   |   |")
      print ("---|---|---")
      print ("   |   |")
      print (" "+board[4]+" | "+board[5]+" | "+board[6]+"  ")
      print ("   |   |")
      print ("---|---|---")
      print ("   |   |")
      print (" "+board[7]+" | "+board[8]+" | "+board[9]+"  ")
      print ("   |   |   ")
  
  while True:
      os.system("clear")
      printTitle()
      printBoard()
      choice = input("Please choose an empty space for X. ").upper()
      choice = int(choice)
      if board[choice] == " ":
          board[choice] = "X"
      else:
          print "Sorry, that space is not empty!"
          time.sleep(1)
  </code></pre>
  
  <p>The result should be:</p>
  
  <pre><code>   |   |
     |   |
     |   |
  -------------
     |   |
     |   |
     |   |
  -------------
     |   |
     |   |
     |   |
  </code></pre>
  
  <hr>
  
  <p>Error message (from @Prune):</p>
  
  <pre class="lang-none prettyprint-override"><code>  File "so.py", line 20
      """
        ^
  SyntaxError: invalid syntax
  </code></pre>