Processing text using python

Xavier Morel xavier.morel at masklinn.net
Mon Feb 20 17:43:21 EST 2006


Fredrik Lundh wrote:
> did you read the string chapter in the tutorial ?
> 
> http://docs.python.org/tut/node5.html#SECTION005120000000000000000
> 
> around the middle of that chapter, there's a section on slicing:
> 
>     "substrings can be specified with the slice notation: two indices
>     separated by a colon"
> 
Fredrik, how would you use slices to split a string by groups of 3 
characters?



More information about the Python-list mailing list