On Aug 20, 10:45 am, Chris Rebert <c...@rebertia.com> wrote:
> On Sat, Aug 20, 2011 at 1:25 AM, Jurgens de Bruin <debrui...@gmail.com> wrote:
>
> > Hi,
>
> > I have a list of tuples:
>
> > [(2,),(12,13),(2,3,4),(8,),(5,6),(7,8,9),]
>
> > I would like to compare all the tuples to each other and if one
> > element if found two tuples the smallest tuples is removed from the
> > list.
>
> So, would [(5,6), (6,7,8)] become [(6,7,8)] ?
>
> If no, then I believe you're trying to solve the set covering 
> problem:http://en.wikipedia.org/wiki/Set_cover_problem
>
> Cheers,
> Chris
> --http://rebertia.com

[(5,6), (6,7,8)] would become [(6,7,8)].

Thanks for the response

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to