I have created a 10 by 10 game board. It is a 2D list, with another list of 2 inside. I used
board = [[['O', 'O']] * 10 for x in range(1, 11)]
. So it will produce something like
['O', 'O'] ['O', 'O']...
['O', 'O'] ['O', 'O']...
Later on I want to set a single cell to have 'C' I use board.gameBoard[animal.y][animal.x][0] = 'C'
board being the class the gameBoard is in, and animal is a game piece, x & y are just ints. Some times it will work and the specified cell will become ['C', 'O'], other times it will fill the entire row with ['C', 'O']['C', 'O']['C', 'O']['C', 'O']
Does anyone know why that might be happening?