I want to know why using randint(0, len(board) - 1) instead of randint(0, len(board))
These functions should return a random row index and a random column index from your board, respectively.
u r returning the index not the value and index starts from zero. so it should be length - 1.
I don't understand that...
The value of
len(board) is 5 not 6 so
len(board) - 1 return 4, isn't ?
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.