String + number split

Terry Reedy tjreedy at udel.edu
Mon Apr 12 16:46:38 EDT 2004


"Stevie_mac" <no.email at please.com> wrote in message
news:c5epc8$1scu$1 at news.wplus.net...
> Heres my solution...

If I did not feel like looking up how to do the split with regular
expressions, as others have suggested,  I would scan the string in reverse
with 'for i in range(len(s)-1, -1, -1)'  instead of reversing the string.
Then slice.

tjr







More information about the Python-list mailing list