String Replacement

John Hunter jdhunter at
Sun Aug 3 20:45:26 CEST 2003

>>>>> "Tyler" == Tyler Eaves <tyler at> writes:

    Tyler> str = str.replace("\n", "<br>")

'str' is a built in function

>>> str(1)

And you will be overriding this functionality if you name something
'str'.  Perfectly legal, but might lead to some hard to diagnose bugs
in the future.

John Hunter

More information about the Python-list mailing list