Simplify sudoku.is_completed() using builtin all() (#1608)

* Simplify sudoku.is_completed() using builtin all()

Simplify __sudoku.is_completed()__ using Python builtin function [__all()__](https://docs.python.org/3/library/functions.html#all).

* fixup! Format Python code with psf/black push

* Update sudoku.py

* fixup! Format Python code with psf/black push

* Old style exception -> new style for Python 3

* updating DIRECTORY.md

* Update convex_hull.py

* fixup! Format Python code with psf/black push

* e.args[0] = "msg"

* ValueError: could not convert string to float: 'pi'

* Update convex_hull.py

* fixup! Format Python code with psf/black push
This commit is contained in:
Christian Clauss
2019-12-08 22:42:17 +01:00
committed by GitHub
parent 9eb50cc223
commit 26b0803319
4 changed files with 20 additions and 29 deletions

View File

@ -104,9 +104,7 @@ class Graph:
# u -> v(w)
for u in self.adjList:
print(
u,
"->",
" -> ".join(str(f"{v}({w})") for v, w in self.adjList[u]),
u, "->", " -> ".join(str(f"{v}({w})") for v, w in self.adjList[u]),
)
def dijkstra(self, src):