Skip to content

Commit

Permalink
Update sudoku.py
Browse files Browse the repository at this point in the history
black fix
  • Loading branch information
opensource-lover authored Jan 11, 2025
1 parent 77a8761 commit aaaf716
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions homework02/sudoku.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Sudoku solving program.
"""

import pathlib
import typing as tp
from random import randint
Expand Down Expand Up @@ -30,8 +31,7 @@ def display(ngrid: tp.List[tp.List[str]]) -> None:
width = 2
line = "+".join(["-" * (width * 3)] * 3)
for row in range(9):
print("".join(ngrid[row][col].center(width) + \
("|" if str(col) in "25" else "") for col in range(9)))
print("".join(ngrid[row][col].center(width) + ("|" if str(col) in "25" else "") for col in range(9)))
if str(row) in "25":
print(line)
print()
Expand Down Expand Up @@ -180,7 +180,7 @@ def check_solution(solution: tp.List[tp.List[str]]) -> bool:
"""Если решение solution верно, то вернуть True, в противном случае False"""
for y, line in enumerate(solution):
for x, n in enumerate(line):
if n == '.':
if n == ".":
return False

pos = (y, x)
Expand Down

0 comments on commit aaaf716

Please sign in to comment.