Light Mode
Dark Mode
Fuzzy about one of the hints

Can someone please explain in layman terms what this piece of code is doing:

    if 0 <= n_row < len(grid) and 0 <= n_col < len(grid[n_row]):
        if grid[n_row][n_col]:
            count += 1

return count
Created: Jan. 10, 2015, 1:50 p.m.
Updated: March 1, 2016, 11:19 a.m.
3
6
User avatar
shogun000