2005-11-02, 20:53
guys, sorry if nominclatures are off in this post. here is what i'd like to do, i retreive a list that arrives to python like this:
element1<br>
element2<br>
element3<br>
i want to reformat it to:
element1\n
element2\n
element3\n
this works:
self.final = strinfo[1].replace("</td></tr>","\n ")
^
but only at the single element level ('^')
is there a way to either do a 'foreach' or adjust the string above to do all the elements of the array?
cheers,
-tartag
element1<br>
element2<br>
element3<br>
i want to reformat it to:
element1\n
element2\n
element3\n
this works:
self.final = strinfo[1].replace("</td></tr>","\n ")
^
but only at the single element level ('^')
is there a way to either do a 'foreach' or adjust the string above to do all the elements of the array?
cheers,
-tartag