Skip to content

Commit 7b7ee2e

Browse files
Refactor character check in crossword solver
1 parent 1666276 commit 7b7ee2e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backtracking/crossword_puzzle_solver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def is_valid(
2727
if r >= rows or c >= cols:
2828
return False
2929
cell = puzzle[r][c]
30-
if cell != "" and cell != ch:
30+
if cell not in ("", ch):
3131
return False
3232
return True
3333

0 commit comments

Comments
 (0)