"Robert Berman" <bermanrl at cfl.rr.com> wrote > constructed. My point of confusion is in ordering the points. Given a > very simple example set of points: > The arrangement should be, > > 0 5 > 0 2 > 0 1 > 2 3 > 2 1 > 5 2 > 5 1 > You might find the itertools.groupby function does most of what you need? HTH, Alan G.