Removing Control characters
Bjorn Pettersen
BPettersen at NAREX.com
Mon Jan 6 12:37:16 EST 2003
> From: Amol Sonaikar [mailto:amol at kenati.com]
>
> In your reply below you have used chr(8) to identify ^H. Can
> I use same
> function chr(8) in if statement
[...]
> Currently I am getting following error. What can be the correct syntax
>
> if str1[i] == chr(8)
> ^
> SyntaxError: invalid syntax
You're missing the colon at the end of the line. If you want, you can
probably file a bug report on SourceForge that the error message isn't
very beginner friendly...
(http://sourceforge.net/tracker/?group_id=5470&atid=105470, you'll need
to create a user and/or log in before you can file bugs).
-- bjorn
More information about the Python-list
mailing list