We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf23715 commit b454071Copy full SHA for b454071
data_structures/arrays/sudoku_solver.py
@@ -172,7 +172,8 @@ def unitsolved(unit):
172
173
def from_file(filename, sep="\n"):
174
"Parse a file into a list of strings, separated by sep."
175
- return open(filename).read().strip().split(sep) # noqa: SIM115
+ with open(filename) as file:
176
+ return file.read().strip().split(sep)
177
178
179
def random_puzzle(assignments=17):
0 commit comments