def check(r,c): pjr = pj[r] clr = cl[c] flr = fl[r//3*3+c//3] myset = set(pjr+clr+flr) return set([1,2,3,4,5,6,7,8,9])-myset def change(r,c,i): pj[r][c] = i cl[c][r] = i fl[r//3*3+c//3][r%3*3+c%3] = i pj,cl,fl = [],[],[] for _ in range(9): pj.append(list(...