backreference
John Machin
sjmachin at lexicon.net
Sun Jan 12 04:31:21 EST 2003
"Cousin Stanley" <CousinStanley at HotMail.com> wrote in message news:<avq0mi$i7pnf$1 at ID-130333.news.dfncis.de>...
> Would a simple non-re version work ???
Quite possibly. However not only does the code you provided not work,
as another poster has already pointed out, on your sample data, but
also ...
> for xLine in list_lines :
> last_char = xLine[ len( xLine ) - 1 : ]
... it is also unnecessarily slow. You might like to consider the
following:
last_char = xLine[-1:]
More information about the Python-list
mailing list