I am writing a tic-tac-toe program and whenever my game gets to here it generates the following error:
# Display board function
def display_board(board):
"""Display game board on screen."""
print "\n\t", board[0], "|", board[1], "|", board[2]
print "\t", "------"
print "\t", board[3], "|", board[4], "|", board[5]
print "\t", "------"
print "\t", board[6], "|", board[7], "|", board[8]
print "\n\t", board[0], "|", board[1], "|", board[2]
IndexError: list index out of range
If this isn't enough code to help with the error I can post more, just don't want to take up pages with unnecessary code.
Thanks in advance