I have looked here but the solution is still not working out for me...
I have 2 lists
list1 = ['src_table', 'error_response_code', 'error_count', 'max_dt']
list2 = ['src_periods_43200', 404, 21, datetime.datetime(2020, 5, 26, 21, 10, 7)',
'src_periods_86400', 404, 19, datetime.datetime(2020, 5, 25, 21, 10, 7)']
The list1
carries the column names
of the HTML
table.
The second list2
carries the table data
.
How do I generate the HTML table
out of these 2 lists so that the first list is used for column names
and the second as the table data
(row-wise)
the result should be:
src_table | error_response_code | error_count | max_dt |
src_periods_43200 | 404 | 21 | 2020-5-26 21:10:7 |
src_periods_43200 | 404 | 19 | 2020-5-25 21:10:7 |
many thanks