lists - append - unique and sorted

rhXX rh00667 at gmail.com
Tue Jun 12 08:03:20 EDT 2007


On Jun 8, 12:17 am, "Delaney, Timothy (Tim)" <tdela... at avaya.com>
wrote:
> Terry Reedy wrote:
> > "Dan Bishop" <danb... at yahoo.com> wrote in message
> >news:1181181710.879767.234090 at m36g2000hse.googlegroups.com...
> >> If you don't need the list to be sorted until you're done building
> >> it, you can just use:
>
> >> lst = sorted(set(lst))
>
> > ?? looks same as
> > lst.sort()
>
> You missed that the OP wants only unique values from the original list.
>
> Tim Delaney

tks to all for comments!





More information about the Python-list mailing list