string methods (warning, newbie)

anthonyberet nospam at me.invalid
Sat Feb 26 21:08:38 EST 2005


anthonyberet wrote:
> Is there a string mething [method] to return only the alpha characters of a string?
> eg 'The Beatles - help - 03 - Ticket to ride', would be 
> 'TheBeatlesTickettoride' 
> 
erm, no it wouldn't, it would be 'TheBeatleshelpTickettoride', but you 
get me, I am sure.

> If not then how best to approach this?
> I have some complicated plan to cut the string into individual 
> characters and then concatenate a new string with the ones that return 
> true with the .isalpha string method.
> 
> Is there an easier way?



More information about the Python-list mailing list