I have this python list
result =[('921', 36638, None, None, 'ron', '28-SEP', 'platform'),
('921', 36637, None, None, 'john', '28-SEP', 'platform')]
The values in this list are dynamic. However the table header is always static.
Table header:
Issue Vers created_on Build Author Commit Source_Name
I want to change this python output and make into a HTML table.
This is my work so far
z = import result
s =open(z)
table=['<htm><body><table border="1">']
for line in s.splitlines():
if not line.strip():
continue
table.append(r'<tr><td>{}</td><td>{}</td></tr>'.format(*line.split('--- ')))
table.append('</table></body></html>')
print ''.join(table)
I am confused as to put the static header.Thanks