Speed up development with full-stack environments for every branch.Learn More
Generating a 3x3 grid [Python]
Forked from Basic Python.6189 Runs 26572 Views 9893 Copies
# Define blank list board =  #Generate rows with length of 3 for row in range(3): # Appen a blank list to each row cell board.append() for column in range(3): # Assign x to each row board[row].append('x') # Function will print board like an actual board def print_board(board): for row in board: print " ".join(row) print_board(board)
Please login/signup to get access to the terminal.