Bengt Richter wrote: > Just thought None as the first argument would be both handy and mnemonic, > signifying no translation, but allowing easy expression of deleting characters, > e.g., > > s = s.translate(None, 'badcharshere') > > Regards, > Bengt Richter
What's wrong with : s = s.replace('badchars', "") It seems obvious to replace a char ( to me anyway ) with a blank string, rather than to 'translate' it to None. I am sure you have a reason what am I missing ? M.E.Farmer -- http://mail.python.org/mailman/listinfo/python-list