def check(l): ref = set(map(str,[1,2,3,4,5,6,7,8,9])) # return sorted(list(ref - set(map(str,l)))) return ref - set(map(str,l)) def block(M, a, b): m,n = a//3, b//3 temp = M[3*m:3*m+3] temp = [x[3*n:3*n+3] for x in temp] return temp[0] + temp[1] + temp[2] mm = [] while ...