```
class Solution:
def spiralOrder(self, matrix):
spiral = []
try:
while True:
spiral += matrix.pop(0)
for i in range(len(matrix)):
spiral.append(matrix[i].pop(-1))
spiral += reversed(matrix.pop(-1))
for i in range(len(matrix)):
spiral.append(matrix[len(matrix) - 1 - i].pop(0))
except:
pass
return spiral
```

Basicly, eat the top line, right line, bottom, then left, loop