basic question: target assignment in for loop
reageer.in at de.nieuwsgroep
Mon Feb 24 10:50:05 CET 2003
>for line in html:
> line = re.sub("regexString", functionReturningString, line),
A 'line' is not a syntactical construct in HTML. Are you sure
whatever you're looking for cannot span multiple lines?
Why don't you just read the entire file in a string? That may
solve both problems.
Also, why don't you use the HTMLParser() module to do the
parsing for you?
Wat wil jij leren? http://www.leren.nl
More information about the Python-list