Aug-22-2019, 05:46 AM
Note also that the function
is_valid_location
can be simplified to, e.g. return not board[bottom_row][column] == 0
. Since the expression board[bottom_row][column] == 0
already evaluates to a boolean, the if
and else
are unnecessary.