easy python code
\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n        matrix = []\n        output = 
```\nclass Solution:\n    def allCellsDistOrder(self, rows: int, cols: int, rCenter: int, cCenter: int) -> List[List[int]]:\n        matrix = []\n        output = []\n        d = {}\n        for i in range(rows):\n            for j in range(cols):\n                matrix.append([i,j])\n        for i in matrix:\n            dist = abs(rCenter - i[0]) + abs(cCenter - i[1])\n            if dist in d:\n                d[dist].append(i)\n            else:\n                d[dist] = []\n                d[dist].append(i)\n        for i in range(len(d)):\n            for j in d[i]:\n                output.append(j)\n        return output\n```\nif this helped, plz consider **upvote**
['Python', 'Python3']