Skip to content

Commit d9b495a

Browse files
committed
Merge branch 'enable-ruff-PGH003-rule' of https://github.com/MaximSmolskiy/Python into enable-ruff-PGH003-rule
2 parents 8f2b3c0 + 644f7bc commit d9b495a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

matrix/spiral_print.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,9 @@ def spiral_traversal(matrix: list[list]) -> list[int]:
116116
[1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7] + spiral_traversal([])
117117
"""
118118
if matrix:
119-
return list(matrix.pop(0)) + spiral_traversal([list(row) for row in zip(*matrix)][::-1])
119+
return list(matrix.pop(0)) + spiral_traversal(
120+
[list(row) for row in zip(*matrix)][::-1]
121+
)
120122
else:
121123
return []
122124

0 commit comments

Comments
 (0)