Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
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. example if tuple 1 and tuple 3 are compare it should find that a single element in

Re: Compare tuples of different lenght

2011-08-20 Thread Chris Rebert
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.

Re: Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
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

Re: Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
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

Re: Compare tuples of different lenght

2011-08-20 Thread Steven D'Aprano
Jurgens de Bruin 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. It's not clear what you mean by smallest tuple. Is

Re: Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
On Aug 20, 12:17 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: Jurgens de Bruin 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

Re: Compare tuples of different lenght

2011-08-20 Thread Peter Otten
Jurgens de Bruin 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. example if tuple 1 and tuple 3 are compare it

Re: Compare tuples of different lenght

2011-08-20 Thread John O'Hagan
On Sat, 20 Aug 2011 01:25:18 -0700 (PDT) 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