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 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 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 com

Re: Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
On Aug 20, 12:17 pm, Steven D'Aprano 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 tuples is removed from th

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"

Re: Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
On Aug 20, 10:45 am, Chris Rebert wrote: > On Sat, Aug 20, 2011 at 1:25 AM, 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 s

Re: Compare tuples of different lenght

2011-08-20 Thread Jurgens de Bruin
On Aug 20, 10:45 am, Chris Rebert wrote: > On Sat, Aug 20, 2011 at 1:25 AM, 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 s

Re: Compare tuples of different lenght

2011-08-20 Thread Chris Rebert
On Sat, Aug 20, 2011 at 1:25 AM, 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. So, would [(

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 ea