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


Groups > comp.lang.python > #45455

Re: Number of cells, using CSV module

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder3.xlned.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:Number': 0.09; 'subject:module': 0.09; 'subject:using': 0.09; 'to:addr:pobox.com': 0.09; 'to:addr:skip': 0.09; 'cc:addr:python- list': 0.11; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'rewritten': 0.16; 'subject:CSV': 0.16; 'wrote:': 0.18; 'cc:addr:gmail.com': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**1': 0.23; 'skip': 0.24; 'header:In-Reply-To:1': 0.27; 'cc:no real name:2**1': 0.33; 'could': 0.34; 'charset:us-ascii': 0.36; 'rather': 0.38; 'received:50.22': 0.84
Date Thu, 16 May 2013 15:01:08 -0500
From Tim Chase <python.list@tim.thechases.com>
To Skip Montanaro <skip@pobox.com>
Subject Re: Number of cells, using CSV module
In-Reply-To <CANc-5Ux8-tHE-EYcjQNixv8re=CVO+QUJWjU+QYH1gA0ZAiGrA@mail.gmail.com>
References <5f4aec0e-5cfa-445f-af50-67cca7caae36@googlegroups.com> <2cd2fe5b-a242-442e-a3fa-e0c5588a370a@googlegroups.com> <CANc-5Ux8-tHE-EYcjQNixv8re=CVO+QUJWjU+QYH1gA0ZAiGrA@mail.gmail.com>
X-Mailer Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
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
Cc tunacubes@gmail.com, python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.1776.1368734348.3114.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1368734348 news.xs4all.nl 15975 [2001:888:2000:d::a6]:47582
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:45455

Show key headers only | View raw


On 2013-05-16 14:08, Skip Montanaro wrote:
> > So rather than
> >>a
> >>b
> >>c
> >>d
> >>e
> >>f
> > I would get [a, b, c, d, e, f]
> 
> all_items = []
> for row in reader:
>     all_items.append(row[0])

And following up here, this could be tidily rewritten as

  all_items = [row[0] for row in reader]

-tkc


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


Thread

Number of cells, using CSV module tunacubes@gmail.com - 2013-05-16 11:29 -0700
  Re: Number of cells, using CSV module Skip Montanaro <skip@pobox.com> - 2013-05-16 13:40 -0500
    Re: Number of cells, using CSV module tunacubes@gmail.com - 2013-05-16 11:50 -0700
      Re: Number of cells, using CSV module Skip Montanaro <skip@pobox.com> - 2013-05-16 14:07 -0500
      Re: Number of cells, using CSV module Tim Chase <python.list@tim.thechases.com> - 2013-05-16 15:00 -0500
  Re: Number of cells, using CSV module tunacubes@gmail.com - 2013-05-16 11:53 -0700
    Re: Number of cells, using CSV module Skip Montanaro <skip@pobox.com> - 2013-05-16 14:08 -0500
    Re: Number of cells, using CSV module Tim Chase <python.list@tim.thechases.com> - 2013-05-16 15:01 -0500
  Re: Number of cells, using CSV module tunacubes@gmail.com - 2013-05-16 13:11 -0700

csiph-web