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


Groups > comp.lang.python > #58827 > unrolled thread

RE: chunking a long string?

Started byNick Cash <nick.cash@npcinternational.com>
First post2013-11-08 17:59 +0000
Last post2013-11-08 17:59 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  RE: chunking a long string? Nick Cash <nick.cash@npcinternational.com> - 2013-11-08 17:59 +0000

#58827 — RE: chunking a long string?

FromNick Cash <nick.cash@npcinternational.com>
Date2013-11-08 17:59 +0000
SubjectRE: chunking a long string?
Message-ID<mailman.2235.1383933591.18130.python-list@python.org>
> I have a long string (several Mbytes).  I want to iterate over it in manageable chunks

This is a weirdly common question. See http://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks-in-python for several solutions.

It's been proposed to be added to itertools before, but rejected: https://mail.python.org/pipermail/python-ideas/2012-July/015671.html and http://bugs.python.org/issue13095 

- Nick Cash 

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web