Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45455
| Date | 2013-05-16 15:01 -0500 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: Number of cells, using CSV module |
| 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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1776.1368734348.3114.python-list@python.org> (permalink) |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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