Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
R=range(63)
for i in R:m=[[i>0==(x*y-961)*0**m[y][x]*~-sum(sum(k[x-(x>0):][k[x+x%~x:2+(x>0)]x+2])for k in m[y-(y>0):][m[y+y%~y:2+(y>0)]y+2])for x in R]for y in R]
print m