May I know how do i edit a constant 2D array variable upon meeting certain conditions and then save into the variable for processing later ? Currently, with the code below, I was unable to store my data in userInput into the column variable.
When i print BOARD, the values are still unchanged ! How will i be able to traverse the 2D array as shown below and edit certain elements and save them back into the variable BOARD?
The source code is below :
for row in BOARD:
if userInput not in row:
userInput = raw_input ("Please enter a character into the program")
if userInput in row:
for column in row:
if userInput != column:
print column
print userInput
column = userInput
break