chunking a long string?

Nick Cash at
Fri Nov 8 18:59:33 CET 2013

> I have a long string (several Mbytes).  I want to iterate over it in manageable chunks

This is a weirdly common question. See for several solutions.

It's been proposed to be added to itertools before, but rejected: and 

- Nick Cash 

More information about the Python-list mailing list