title: Closest Pair Algorithm in Python: difficulty sorting by x and y coordinates
body: <p>I'm trying to define a function that takes an array, consisted of points with x and y coordinates, as input. I need 2 outputs: one array that has the points sorted by their x coordinates and another array that has the points sorted by their y coordinate. I'm doing it in python. Thanks. </p>