Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #11905
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <chris@rebertia.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.038 |
| X-Spam-Evidence | '*H*': 0.92; '*S*': 0.00; 'skip:[ 40': 0.07; 'problem:': 0.09; 'am,': 0.12; 'received:209.85.213.174': 0.16; 'received:mail-yx0-f174.google.com': 0.16; 'cc:addr:python-list': 0.16; 'wrote:': 0.16; 'cheers,': 0.18; 'cc:no real name:2**0': 0.20; 'trying': 0.21; 'cc:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'smallest': 0.23; 'aug': 0.24; 'url:wiki': 0.25; 'compare': 0.28; 'sat,': 0.28; 'message-id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.30; 'tuples': 0.30; 'chris': 0.32; 'list': 0.32; 'hi,': 0.32; 'list.': 0.35; 'element': 0.37; 'two': 0.37; 'received:google.com': 0.38; 'url:org': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.39; 'url:en': 0.39; 'covering': 0.63; 'believe': 0.65; 'become': 0.71; 'sender:addr:chris': 0.84; 'subject:different': 0.84; 'url:rebertia': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rJKu1MHEN7peCV4ptg+f/nUDZi+ooGMrVqP2g/4ivEY=; b=En0m8hYbjb+5UWCWkmLX1o7VwE0IN69/0DofJoEJDUm2VaTJglb2rZbAKUZULoK5S3 hBOgIV7VXG1BPOP6kktATtCg29i5GPOcWo5v5NjaolUZ8ZzFCPUcb4s/yJ30zXmm6PQH N5wU1G+qCwkosunbeHXZbOrS03UEqKOFuVESw= |
| MIME-Version | 1.0 |
| Sender | chris@rebertia.com |
| In-Reply-To | <c5deea4a-7e0a-491f-8425-ab1c2acf6c60@t9g2000vbs.googlegroups.com> |
| References | <c5deea4a-7e0a-491f-8425-ab1c2acf6c60@t9g2000vbs.googlegroups.com> |
| Date | Sat, 20 Aug 2011 01:45:04 -0700 |
| X-Google-Sender-Auth | hR10h34RvmcsrGqFHHIRA163_jg |
| Subject | Re: Compare tuples of different lenght |
| From | Chris Rebert <clp2@rebertia.com> |
| To | Jurgens de Bruin <debruinjj@gmail.com> |
| Content-Type | text/plain; charset=UTF-8 |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.255.1313829907.27778.python-list@python.org> (permalink) |
| Lines | 20 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1313829907 news.xs4all.nl 23983 [2001:888:2000:d::a6]:56755 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:11905 |
Show key headers only | View raw
On Sat, Aug 20, 2011 at 1:25 AM, Jurgens de Bruin <debruinjj@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Compare tuples of different lenght Jurgens de Bruin <debruinjj@gmail.com> - 2011-08-20 01:25 -0700
Re: Compare tuples of different lenght Chris Rebert <clp2@rebertia.com> - 2011-08-20 01:45 -0700
Re: Compare tuples of different lenght Jurgens de Bruin <debruinjj@gmail.com> - 2011-08-20 01:54 -0700
Re: Compare tuples of different lenght Jurgens de Bruin <debruinjj@gmail.com> - 2011-08-20 02:00 -0700
Re: Compare tuples of different lenght Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-20 20:17 +1000
Re: Compare tuples of different lenght Jurgens de Bruin <debruinjj@gmail.com> - 2011-08-20 03:47 -0700
Re: Compare tuples of different lenght Peter Otten <__peter__@web.de> - 2011-08-20 13:56 +0200
Re: Compare tuples of different lenght John O'Hagan <research@johnohagan.com> - 2011-08-21 01:03 +1000
csiph-web