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


Groups > comp.lang.python > #19989

Re: iterating over list with one mising value

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <a.france.mailinglists@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.152
X-Spam-Level *
X-Spam-Evidence '*H*': 0.70; '*S*': 0.01; 'lawrence': 0.09; "'',": 0.16; 'x[i]': 0.16; 'wrote:': 0.18; 'subject:list': 0.21; 'header :In-Reply-To:1': 0.22; "skip:' 10": 0.29; 'problem': 0.29; 'print': 0.29; 'pm,': 0.29; 'message-id:@gmail.com': 0.31; 'header :User-Agent:1': 0.33; 'to:addr:python-list': 0.35; '...': 0.35; 'received:google.com': 0.37; 'subject:with': 0.37; 'received:209.85': 0.38; 'received:192': 0.38; 'received:209.85.215': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.40; "we've": 0.64; 'aaron': 0.67; 'subject:one': 0.77; 'subject:over': 0.84; 'subject:value': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=rCalv5PozKQ069QEpaAUE4XpAe53cjEjUoGTAjTF61E=; b=D83ojTHAhX7g0iI259ehkyEvrJ/KiCPqWRjmB8prx+4x7NTEDSDzSPjf/MOEJFZpAa zFfs9VDEDgyfnLoifvocLBt/+6uqIanfY/cB+O6W72xhgSiyKfW5kw596irUEQx9lxqF 6Au4ZUysOpNPmsubz9NEE3oWBsFxizVXjcAko=
Date Tue, 07 Feb 2012 23:30:30 +0100
From Aaron France <a.france.mailinglists@gmail.com>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20120131 Thunderbird/10.0
MIME-Version 1.0
To python-list@python.org
Subject Re: iterating over list with one mising value
References <1328646189.84221.YahooMailClassic@web161206.mail.bf1.yahoo.com> <4F319406.8060206@mrabarnett.plus.com> <4F3196B9.8080109@gmail.com> <jgs7ef$imm$1@dough.gmane.org>
In-Reply-To <jgs7ef$imm$1@dough.gmane.org>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
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.5520.1328653918.27778.python-list@python.org> (permalink)
Lines 36
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328653918 news.xs4all.nl 6965 [2001:888:2000:d::a6]:58276
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:19989

Show key headers only | View raw


On 02/07/2012 11:09 PM, Mark Lawrence wrote:
> On 07/02/2012 21:25, Aaron France wrote:
>> for i in range(0, len(x), 2):
>>      print x[i-1], x[i]
> x = ['with', 3, 'which', 1, 'were', 2, 'well', 1, 'water', 1, 'was', 4,
> 'two', 1, 'to', 2, 'through', 1, 'thlabour', 1, 'these', 1, 'theat', 1,
> 'the', 8, 'tetanus', 1, 'started', 1, 'size', 1, 'scent', 1,
> 'respectively', 1, 'received', 1, 'problems', 2, 'prince', 1,
> 'pregnancy', 1, 'poured', 1, 'peace', 1, 'pains', 1, 'painless', 1,
> 'out', 1, 'of', 1, 'noseat', 1, 'nose', 2, 'no', 2, 'maternity', 1,
> 'malformation', 1, 'made', 1, 'lower', 1, 'labour/delivery', 2,
> 'kintampo', 1, 'into', 1, 'injections', 1, 'in', 3, 'i', 2, 'hospital',
> 1, 'home', 1, 'him', 1, 'having', 1, 'had', 2, 'green', 1, 'gave', 1,
> 'flowing', 2, 'encountered', 1, 'eleven', 1, 'during', 3, 'district', 1,
> 'difficulty', 1, 'cord', 1, 'consecutive', 1, 'colour', 1, 'cleared', 1,
> 'child', 1, 'checkups', 1, 'came', 1, 'but', 2, 'breathing', 2,
> 'breath', 1, 'blood', 2, 'bleeding', 1, 'birth', 4, 'before', 1, 'bad',
> 1, 'average', 1, 'at', 2, 'assist', 1, 'artificial', 1, 'around', 2,
> 'antenatal', 1, 'and', 5, 'an', 1, 'ambrical', 1, 'air', 1, 'abdominal',
> 1, '600am', 1, '100pm', 1, '', 3, 'other']
> for i in range(0, len(x), 2):
>     print x[i-1], x[i]
>
> other with
> 3 which
> ...
> 1
> 3 other
>
> Houston, we've got a problem:)
>
Yupp.

The real problem is that there's been over 20 messages about this 'problem'.

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


Thread

Re: iterating over list with one mising value Aaron France <a.france.mailinglists@gmail.com> - 2012-02-07 23:30 +0100

csiph-web