[EMAIL PROTECTED] wrote: > I have one question about string.I am trying to make an function to > analyze line of some text, this is my example: "HELLO;HELLO2:WORLD:", > if that function in this text find ";" and ":" ( in this example will > find both) > > e.g that function must return this: > > > "HELLO;\nHELLO2:\n\t\t\t\t\t\t\tWORLD:" >
If I understand you correctly you want to replace ";" by ";\n" and ":" by ":\n\t\t\t\t\t\t\t". Well guess what? The replace() method does just this. Have a read: <URL:http://docs.python.org/lib/string-methods.html> /W -- http://mail.python.org/mailman/listinfo/python-list