Skip to content

Instantly share code, notes, and snippets.

View shubhamwagh's full-sized avatar
🎯
Focusing

Shubham Wagh shubhamwagh

🎯
Focusing
View GitHub Profile
@shubhamwagh
shubhamwagh / spiral.py
Created October 6, 2020 11:10 — forked from cablehead/spiral.py
Iterate a 2d matrix using a spiral pattern
import unittest
import copy
from itertools import cycle
def row(matrix, n):
# returns row n of a 2d matrix
return matrix.pop(n)