"Barry A. Warsaw" wrote:
>
> Yep, and I prefer them to slicing even when testing the first or last
> character:
>
> if somestring.startswith('^'):
> # do caret
>
> if somestring.endswith('\n'):
> # don't add it
Hmmm... I wonder if HTMLParser.py could benefit from use of these?
cheers,
Chris