Chris Mellon arkanes at
Tue Oct 16 20:12:00 CEST 2007

On 10/16/07, Massimo Di Pierro <mdipierro at> wrote:
> Even stranger
>  >>> re.sub('a', '\\n','bab')
> 'b\nb'
>  >>> print re.sub('a', '\\n','bab')
> b
> b

You called print, so instead of getting an escaped string literal, the
string is being printed to your terminal, which is printing the

More information about the Python-list mailing list