From: Park Heesob Date: 2002-07-07T18:19:58+09:00 Subject: Re: Collapsing array output "Bil Kleb" wrote in message news:3D27DCC3.27D53F3D@LaRC.NASA.Gov... > I recall discussion of something similar a while ago, but I cannot > find it... > > I would like to consolidate the output of some arrays containing > sequences of (string) numbers like, > > 3, 4, 5, 8, 10, 11, 15, 17 > > to an output like, > > 3-5, 8, 10-11, 15, 17 > > Can someone point me in the right direction? > My first try: -------------------------------------- a = 3, 4, 5, 8, 10, 11, 15, 17 b = [] first = 0 while first Thanks, > -- > Bil > Park Heesob