Skip to content

Commit b17710d

Browse files
authored
Update valid-square.py
1 parent 0c8a920 commit b17710d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/valid-square.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ def dist(p1, p2):
3131
counter = collections.Counter([dist(p1, p2), dist(p1, p3),\
3232
dist(p1, p4), dist(p2, p3),\
3333
dist(p2, p4), dist(p3, p4)])
34-
return 0 not in counter and len(counter) == 2
34+
return counter[0] == 0 and len(counter) == 2

0 commit comments

Comments
 (0)