Example coordinate_lst = [(-1, -1), (-1, 0), (-1, 1), (0, -1), (0, 0), (0, 1), (1, -1), (1, 0), (1, 1)] The pattern I'm looking for after sorting is: [x,y] coordinate shall be sorted by y. The new list should look like: coordinate_lst = [(-1, -1), (-1, 0), (-1, 1), (0, 1), (0, 0), (0, -1), (1, -1), (1, 0), (1, 1)] Continue reading...