[Tutor] Another string-manipulation question
Kent Johnson
kent37 at tds.net
Thu May 10 01:20:37 CEST 2007
Alan Gilfoy wrote:
> Given a string, how would I?:
> 2. Make sure that there are no symbols (non-letter, non-number) in the
> string, and, if one is found, remove it.
>
> Pseudocode time, as to a potential approach-
>
> for each character in the string:
> if character not in
> "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ":
> remove it
A couple of solutions here:
http://tinyurl.com/2qqy32
except substitute ascii_letters for printable.
Kent
More information about the Tutor
mailing list