I am a novice coder and am not able to figure out my mistake here... I have a text that looks like this:
AAA,48,48,0,0,0,0,0,0,0,0,0
BBB,30,24,6,0,6,0,0,0,0,0,0
I want to write it to a HTML table. The code for that is this:
temp_lines=ftemp.readlines();
for line in temp_lines:
tl,total,counter_pass,counter_kbug,counter_ubug,totbug,counter_kscr,counter_uscr,totscr,counter_kset,counter_uset,totset=line.split(",");
f.write("<tr><td height=\"30\"><a href="something".html>"+str(t1)+"</a></td><td height=\"30\">"+str(total)+"</a></td><td height=\"30\">"+str(counter_pass)+"</td><td height=\"30\">"+str(counter_kbug)+"</td><td>"+str(counter_ubug)+"</td><td height=\"30\">"+str(totbug)+"</td><td height=\"30\">"+str(counter_kscr)+"</td><td height=\"30\">"+str(counter_uscr)+"</td><td height=\"30\">"+str(totscr)+"</td><td height=\"30\">"+str(counter_kset)+"</td><td height=\"30\">"+str(counter_uset)+"</td><td height=\"30\">"+str(totset)+"</td></tr></center><br>");
I am getting this error:
TypeError: cannot concatenate 'str' and 'list' objects
I am explicitely converting every list object to string. Where am I going wrong?