8. ...and seek


#1

When we enter the randint the code looks like this:

def random_row(board):
return randint(0, len(board) - 1)

def random_col(board):
return randint(0, len(board) - 1)

but the next lesson it looks like this:

def random_row(board):
return randint(0, len(board) - 1)

def random_col(board):
return randint(0, len(board[0]) - 1)

Why did the len in random_col change from len(board) to len(board[0]) ?


#2

Looking at the length of a row gets you the width
Looking at the number of rows gets you the height