import re str = '123456789983qw' re.findall("(.{3})", str)+[str[-(len(str) % 3):]]
[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, > -- Best regards, Maksim Kasimov mailto: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/python-list