Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #19985

Re: iterating over list with one mising value

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.056
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message- id:@tim.thechases.com': 0.16; 'received:50': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'cc:addr:python-list': 0.16; 'help.': 0.19; 'subject:list': 0.21; 'header:In-Reply-To:1': 0.22; 'defined': 0.24; 'function': 0.27; 'cc:addr:gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'cc:2**2': 0.31; 'url:library': 0.31; 'thanks': 0.32; 'does': 0.32; 'header :User-Agent:1': 0.33; 'url:python': 0.35; 'subject:with': 0.37; 'should': 0.38; 'url:org': 0.39; 'more': 0.61; 'your': 0.61; 'here:': 0.67; 'subject:one': 0.77; 'to:addr:yahoo.com': 0.83; 'subject:over': 0.84; 'subject:value': 0.84; 'cc:no real name:2**2': 0.95
Date Tue, 07 Feb 2012 15:31:49 -0600
From Tim Chase <python.list@tim.thechases.com>
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16
MIME-Version 1.0
To Sammy Danso <samdansobe@yahoo.com>
Subject Re: iterating over list with one mising value
References <1328646189.84221.YahooMailClassic@web161206.mail.bf1.yahoo.com>
In-Reply-To <1328646189.84221.YahooMailClassic@web161206.mail.bf1.yahoo.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Source
X-Source-Args
X-Source-Dir
Cc python-list@python.org, d@davea.name
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.5516.1328650295.27778.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328650296 news.xs4all.nl 6899 [2001:888:2000:d::a6]:58153
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19985

Show key headers only | View raw


> Thanks for your responses and help. thought I should provide
> more information for clarity.

It sounds like you want the "grouper" function as defined here:

http://docs.python.org/library/itertools.html#recipes

which does what you describe.

-tkc

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: iterating over list with one mising value Tim Chase <python.list@tim.thechases.com> - 2012-02-07 15:31 -0600

csiph-web