class Solution: def spiralOrder(self , matrix ): res = [] while matrix: res += matrix[0] matrix = list(zip(*matrix[1:]))[::-1] return res
class Solution: def spiralOrder(self , matrix ): res = [] while matrix: res += matrix[0] matrix = list(zip(*matrix[1:]))[::-1] return res