I don't quiet understand the example... Nr. 8 ...and Seek! [EDIT] Solved


I understand what I have to do to pass the lesson, but I don't really understand WHY it works.
What I don't get ist how the program knows that the first bracket (in the example shown it's [2]) refers to a row and the second bracket (in the example it's [3]) refers to a column.
It seems like I should know, but I hope someone can explain :confused:.


They don't.

The board is a list of 5 rows.

Each row is 5 squares.

board[2] is the third row
board[3] is the fourth row

[['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O'],
 ['O', 'O', 'O', 'O', 'O']]


I got it now, board[2] is the third row and board[2][3] is the fourth item of the third row.