Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Uncategorized category for Moore Neighbourhood by Mahoter
def count_neighbours(grid, row, col):
qant = 0
a = 0
for tabr in grid:
tabrow = list(tabr)
if a == row-1 or a == row+1:
for b in [col-1,col,col+1]:
if b >=0 and b=0 and b
Jan. 17, 2016