Deleting characters from a string
skip at mojam.com
Sun Jun 6 15:57:29 EDT 1999
> What I would really like to be able to do is write:
> host = string.translate(host, None, ' "')
> Am I missing a more elegant solution?
Probably less elegant, but you can use string.replace. You'll have to
call it twice to get the spaces and the double quotes:
host = string.replace(string.replace(host, '"', ""), " ", "")
Skip Montanaro | Mojam: "Uniting the World of Music"
skip at mojam.com | Musi-Cal: http://www.musi-cal.com/
More information about the Python-list