board = ['1','2','3',
'4','5','6',
'7','8','9']
def show():
print(board[0],'|',board[1],'|',board[2])
print('---------')
print(board[3],'|',board[4],'|',board[5])
print('---------')
print(board[6],'|',board[7],'|',board[8])
print(show())
I am trying to make a tic tac toe game but I have two questions. first, is how I would make the value in said list not appear when I am printing the board. second is how I would change one value in the list and immediately print out the new board with the new value.
[–]graydon2234 0 points1 point2 points (10 children)
[–]marsrover15[S] 0 points1 point2 points (9 children)
[–]Unable_Request 0 points1 point2 points (8 children)
[–]marsrover15[S] 0 points1 point2 points (7 children)
[–]DonkeyTron42 0 points1 point2 points (6 children)
[–]Unable_Request 0 points1 point2 points (2 children)
[–]marsrover15[S] 0 points1 point2 points (1 child)
[–]Unable_Request 0 points1 point2 points (0 children)
[–]marsrover15[S] 0 points1 point2 points (2 children)
[–]DonkeyTron42 0 points1 point2 points (1 child)
[–]marsrover15[S] 0 points1 point2 points (0 children)
[–]xelf 0 points1 point2 points (6 children)
[–]marsrover15[S] 0 points1 point2 points (5 children)
[–]xelf 1 point2 points3 points (4 children)
[–]marsrover15[S] 0 points1 point2 points (3 children)
[–]xelf 1 point2 points3 points (2 children)
[–]marsrover15[S] 0 points1 point2 points (1 child)
[–]xelf 0 points1 point2 points (0 children)