🔥 [Python3] Short brute-force, using list comprehension
python3 []\nclass Solution:\n    def largestLocal(self, grid: List[List[int]]) -> List[List[int]]:\n        N = len(grid)-2\n        res = [[0] * N for _ in ran
```python3 []\nclass Solution:\n    def largestLocal(self, grid: List[List[int]]) -> List[List[int]]:\n        N = len(grid)-2\n        res = [[0] * N for _ in range(N)]\n        for i,j in product(range(N), range(N)):\n            res[i][j] = max(grid[r][c] for r, c in product(range(i, i+3), range(j, j+3)))\n\n        return res\n```\n```python3 []\nclass Solution:\n    def largestLocal(self, grid: List[List[int]]) -> List[List[int]]:\n        N = len(grid)-2\n        res = [[0] * N for _ in range(N)]\n        for i in range(N):\n            for j in range(N):\n                res[i][j] = max([grid[r][c] for r in range(i, i+3) for c in range(j, j+3)])\n\n        return res\n```
['Matrix', 'Python', 'Python3']