Convert grid into a dict of {square: char} with '0' or '.' for empties.
(grid)
| 75 | |
| 76 | |
| 77 | def grid_values(grid): |
| 78 | """ |
| 79 | Convert grid into a dict of {square: char} with '0' or '.' for empties. |
| 80 | """ |
| 81 | chars = [c for c in grid if c in digits or c in "0."] |
| 82 | assert len(chars) == 81 |
| 83 | return dict(zip(squares, chars)) |
| 84 | |
| 85 | |
| 86 | def assign(values, s, d): |
no outgoing calls
no test coverage detected