[Tutor] Splitting long string into same len parts

Kent Johnson kent37 at tds.net
Thu Feb 9 11:56:21 CET 2006


Victor Bouffier wrote:
> Hi to all,
> 
> I'd like to split a long string into equally long strings (len(str) =
> 3). 

This is a very popular topic in the Python Cookbook. See for example
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/425044
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/439095

and the links in the comments for the first recipe above.

Kent



More information about the Tutor mailing list