How to modify this script?

Kurt Hansen kurt at ugyldig.invalid
Sun Jan 6 16:05:41 CET 2013


Den 06/01/13 15.52, Chris Angelico skrev:
> On Mon, Jan 7, 2013 at 1:40 AM, Kurt Hansen <kurt at ugyldig.invalid> wrote:
>> failed: cannot concatenate 'str' and 'tuple' objects
>
> The problem is this line:
>
> output += '<tr><td colspan="3">', line, '</td></tr>'
>
> Change it to:
>
> output += '<tr><td colspan="3">' + line + '</td></tr>'

:-)

Something happened allright, but ...
Output with this change:

<td colspan="3">' + line + '</td></tr>'
	else:
	        for item in columns:
         	        output += '<td\>' + item + '</td\> '

         output += '</tr\>\n';

output += '</table\>';
return output
 >
-- 
Venlig hilsen
Kurt Hansen



More information about the Python-list mailing list