How to split string in equally long parts

Heiko Henkelmann heiko at hhenkelmann.de
Wed Apr 9 15:27:12 EDT 2003


to be more precise: The fastest way...

Thanx for all of the answers


"Peter Hansen" <peter at engcorp.com> schrieb im Newsbeitrag
news:3E935B75.64968B9 at engcorp.com...
> Heiko Henkelmann wrote:
> >
> > I need to split a string into an array of equally long substrings, like
> > e.g.:
> >
> > '1234567890'   -> ['12', '34','56','78','90']
> >
> > What is the most efficient way to do this?
>
> Define "efficient" ...
>
> And see also http://groups.google.ca/groups?th=7848e47f9918f3f7
>
> -Peter






More information about the Python-list mailing list