python3 Solution
\n\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n        res=[]\n        for r in ran
\n```\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n        res=[]\n        for r in range(rows):\n            for c in range(cols):\n                res.append([r,c])\n                \n        res.sort(key=lambda x:abs(x[0]-rCenter)+ abs(x[1]-cCenter))\n        return res\n```
['Python3']