[EMAIL PROTECTED] wrote: > Hi, > > Is there a function that split a string into groups, containing an "x" > amount of characters? > > Ex. > TheFunction("Hello World",3) > > Returns: > > ['Hell','o W','orl','d'] > > > Any reply would be truly appreciated. > > Thank You, >
Maybe, somewhere out there -- you could write one yourself, like this: # untested def nsplit(s, n): return [s[k:k+n] for k in xrange(0, len(s), n)] -- http://mail.python.org/mailman/listinfo/python-list