remove special characters from line

Chris Rennert Chris.Rennert at mdi-oshkosh.com
Tue Jul 1 21:27:58 CEST 2003


I apologize for being vague on what a "special" character is in my context.
For me, it would be anything that isn't A..Z , a..z, or 0..9  .
My list seems to work, or like it was suggested I could have used a string
as well.  I thank everyone for the help, and I am really enjoying learning
Python.

Thanks again,
Chris Rennert
"Chris Rennert" <Chris.Rennert at mdi-oshkosh.com> wrote in message
news:3f01a27d$0$43847$39cecf19 at news.twtelecom.net...
> Hello all,
>
> If I have a line like this
>
> ²blah blah blah blah blah
>
> I know I could do a slice like this [1:] to pull everything but the
special
> character, but what if I have several lines in a file.
> I am not sure how I would detect a special character like that.  I would
> just like to pull everything from those lines (and the special character
> always appears as the first character, but not on every line) except for
the
> special characters.
> I hope I have enough detail for someone to help me.
>
> Thanks in advance,
>
> Chris
>
>






More information about the Python-list mailing list