[Tutor] Best method for filtering lists in lists...
Luke Paireepinart
rabidpoobear at gmail.com
Sat Dec 16 02:21:37 CET 2006
Chris Hengge wrote:
> Yes, we went over that a bit ago, but I wasn't sure if there were any
> different or more appropriate approaches to this when dealing with
> multidimensional lists.
>
Well, it depends what you term a redundant list.
Like, is
[[1,2,3],[3,2,1]]
a list with 1 unique elements or two?
If it is 1, then just sort all the lists before you check for redundancy.
I don't think there are any algorithms that are specific to lists of
lists, though there may be.
-Luke
P.S. please reply on-list :)
>
> On 12/15/06, *Luke Paireepinart* <rabidpoobear at gmail.com
> <mailto:rabidpoobear at gmail.com>> wrote:
>
> Chris Hengge wrote:
> > I've got a list of lists that looks like this
> >
> > [[1,2,3], [4,5,6],[1,2,3]]
> >
> > I'm looking for a good way to drop the redundant inner lists
> > (thousands of inner lists)
> >
> > Someone either have a good way to tackle this? or willing to
> point me
> > in the right direction?
> >
> > Thanks!
> >
> Didn't we give multiple solutions to a similar problem with lists
> with
> redundant elements a few weeks ago?
> Well, the solutions will be the same, regardless that the elements
> inside are lists themselves.
>
> HTH,
> -Luke
>
>
More information about the Tutor
mailing list