Parsing a string question....

Sean 'Shaleh' Perry shalehperry at attbi.com
Tue Oct 15 12:29:15 EDT 2002


On Tuesday 15 October 2002 09:18, Allan Waddington wrote:
> I have a string that is 30 characters long.  What function would I use to
> look at characters 15 to 25 or 1 to 14 in this string?
>
> Thanks for the help.
>
>
> Cheers.
>
> Allan

text[15:26] or text[1:15] # need to add one because of the way splicing works.

Check the Python docs for info on slicing.





More information about the Python-list mailing list