[Tutor] "replace" in String module

Sharriff Aina NHYTRO@compuserve.com
Tue, 30 Jan 2001 08:40:29 -0500


Hi Guys!

Why does this fail?

>>> import string
>>> test =3D "<line> the line </line>"
>>> string.find(test, "<line>")
0
>>> string.replace(test, "<dorm>", "<line>")
'<line> the line </line>'
>>> =


I would have thought that the "</line>" would have been left untouched.


regards

Sharriff