Strip down the matrix layer by layer:

```
class Solution:
# @param {integer[][]} matrix
# @return {integer[]}
def spiralOrder(self, matrix):
result = []
while matrix:
try:
result += matrix.pop(0)
except:
break
try:
for row in matrix:
result += [row.pop(-1)]
except:
break
try:
result += matrix.pop(-1)[-1::-1]
except:
break
try:
for row in matrix[-1::-1]:
result += [row.pop(0)]
except:
break
return result
```