Norman Khine wrote:
>
> Hi I have this class:
>
> def title_to_name(title):
> title = title.encode('ascii', 'replace')
> name = title.lower().replace('/', '_').replace('?',
> '_').replace('.', '')
> return '_'.join(name.split())
>
> Is there a way to have just one replace and so that
"Norman Khine" <[EMAIL PROTECTED]> wrote
>name = title.lower().replace('/', '_').replace('?',
> '_').replace('.', '')
>return '_'.join(name.split())
>
> Is there a way to have just one replace and so that:
Check out the string.maketrans() function and
the translate method.
Basically y