Check a half-filled sudoku
A 9×9 sudoku board is given as 9 strings of 9 characters each: a digit 1–9, or . for an empty cell. Return True if the filled cells break no rule: no digit appears twice in the same row, in the same column, or in the same one of the nine 3×3 boxes. Ignore empty cells, and don't check whether the board can be solved.
Aim for one pass over the cells.
Examples
valid_board(["1..8.2..4","5.4.71.2.",".86..5317","41.237.68","...1..27.","..3..6...","..57.96..",".71...4.5","3...58..."])→truevalid_board(["12.8.2..4","5.4.71.2.",".86..5317","41.237.68","...1..27.","..3..6...","..57.96..",".71...4.5","3...58..."])→falsevalid_board(["15.8.2..4","5.4.71.2.",".86..5317","41.237.68","...1..27.","..3..6...","..57.96..",".71...4.5","3...58..."])→false