This is one of my first programs for an online Python course I am taking. I've cobbled together some code that does most of the work but I am still having trouble getting my computer player move to use the random number library and read them to the board. I've tried moving the code within `DrawMove()` directly into the main code with no luck. Currently I have it set up so that two players can play against each other but I want to add `randrange` to the 'X' player so that the player can play against the computer.

```
import itertools
from random import randrange

board = [[1,2,3],
         [4,'X',6],
         [7,8,9]]

def InitialBoard(board):
    print("+-------+-------+-------+\n|       |       |       |\n|  ",board[0][0],"  |  ",board[0][1],"  |  ",board[0][2],"  |")
    print("|       |       |       |\n+-------+-------+-------+\n|       |       |       |")
    print("|  ",board[1][0],"  |  ",'X',"  |  ",board[1][2],"  |\n|       |       |       |\n+-------+-------+-------+")
    print("|       |       |       |\n|  ",board[2][0],"  |  ",board[2][1],"  |  ",board[2][2],"  |\n|       |       |       |")
    print("+-------+-------+-------+")

def DisplayBoard(gameMap, playerMove, row, column):

    try:
        if board[row][column] == 'X' or board[row][column] == 'O':
            print("This space is occupied by X, please try another one.")
            return False
        gameMap[row][column] = playerMove #add parameters to our function
        for row, column in enumerate(gameMap):
            print("+-------+-------+-------+\n|       |       |       |\n|  ",board[0][0],"  |  ",board[0][1],"  |  ",board[0][2],"  |")
            print("|       |       |       |\n+-------+-------+-------+\n|       |       |       |")
            print("|  ",board[1][0],"  |  ",'X',"  |  ",board[1][2],"  |\n|       |       |       |\n+-------+-------+-------+")
            print("|       |       |       |\n|  ",board[2][0],"  |  ",board[2][1],"  |  ",board[2][2],"  |\n|       |       |       |")
            print("+-------+-------+-------+")
        return gameMap
    except IndexError: #handles index error
        print("Out of range, please choose a number between 0-2.")
        return False
    except Exception as e: #handles general errors, prints description of type of error
        print(str(e))
        return False

def VictoryFor(current_game):
   #horizontal
    for row in board:

        column1 = row[0] #all the same on top row
        column2 = row[1]
        column3 = row[2]
        if column1 == column2 == column3:#checks if top row same
            print(f"Player {row[0]} is the winner!")#f string is used to pass variables inside of curly braces

#vertical
    if board[0][0] == board[1][0] == board[2][0]:
        print("Winner in first column!")
        for row in board:
            print(row[0])
    elif board[0][1] == board[1][1] == board[2][1]:
        print("Winner in second column!")
        for row in board:
            print(row[1])
    elif board[0][2] == board[1][2] == board[2][2]:
        print("Winner in third column!")
        for row in board:
            print(row[2])

#diagonal
    if board[0][0] == board[1][1] == board[2][2]:
        print("Diagonal Winner down!")
    if board[2][0] == board[1][1] == board[0][2]:
        print("Diagonal Winner up!")

def DrawMove(board):#computer move

    row_choice = int(randrange(2))
    columnn_choice = int(randrange(2))

#main
play = True 
players = ['X','O']#computer is X, player is O. Computer makes first move.
while play:
    board = [[1, 2, 3],
             [4,'X',6],
             [7, 8, 9]]

    game_won = False
    player_cycle = itertools.cycle(['X','O'])
    InitialBoard(board)
    while not game_won:
        current_player = 'O'#computer has made move in center of board, your turn now
        current_player = next(player_cycle)
        played = False
        while not played:
            print(f"Player: {current_player}")
            column_choice = int(input("Pick a column 0-2:"))
            row_choice = int(input("Pick a row 0-2:"))
            played = DisplayBoard(board, playerMove = current_player, row = row_choice, column = column_choice)
    if VictoryFor(board):
        game_won = True
        again = input("The game is over, play again? Type (y/n)")
        if again.lower() == "y":
            print("Restarting")
        elif again.lower() == "n":
            print("Goodbye")
            play = False
        else:
            play = False

```