Python 1-line sorting based solution
\ndef allCellsDistOrder(self, R: int, C: int, r0: int, c0: int) -> List[List[int]]:\n    return sorted([(i, j) for i in range(R) for j in range(C)], key=lambda 
```\ndef allCellsDistOrder(self, R: int, C: int, r0: int, c0: int) -> List[List[int]]:\n    return sorted([(i, j) for i in range(R) for j in range(C)], key=lambda p: abs(p[0] - r0) + abs(p[1] - c0))\n```\n\nThe same code, more readable:\n```\ndef allCellsDistOrder(self, R: int, C: int, r0: int, c0: int) -> List[List[int]]:\n    def dist(point):\n        pi, pj = point\n        return abs(pi - r0) + abs(pj - c0)\n\n    points = [(i, j) for i in range(R) for j in range(C)]\n    return sorted(points, key=dist)\n```
['Sorting', 'Python', 'Python3']