[Tutor] Can someone help me to improve this segment?

alan.gauld@bt.com alan.gauld@bt.com
Tue, 30 Oct 2001 15:44:05 -0000


>  ************main program piece***********
>  tab = "<table align='center' border='1'>\n %s \n</table>"
   s = ""
>  for x in result:
>     s = s + "<tr>" + string.join(map(f1,x),"")+"</tr>\n"
>  tab = tab % s

>  Can anyone improve this code segment? Thanks alot

Avoids copying the original tab each time.

Alan g