String Replacement
Tyler Eaves
tyler at scalegen.com
Fri Aug 1 21:42:06 EDT 2003
On Fri, 01 Aug 2003 18:26:26 -0700, Fazer wrote:
> Hmm...
>
> This works:
> print string.replace(str, "\n", "<br>")
>
> But I can't assign the result into a variable but only print it like
> the code above.
>
> What can I do to assign the repalced string to a variable? Because I
> Have other string replacements to do with that very same string.
>
> Thanks,
str = str.replace("\n", "<br>")
More information about the Python-list
mailing list