I have two list in a cgi file:
Numbers = [0, 1, 2, 3]
Letters = [A, B, C, D]
How do I iterate through these list and print the values out in html
I ideally my table would look like this:
0 A
1 B
2 C
3 D
and etc.
That means the tables and rows will have to be dictated by how long my list is and how many list I have. Thus I also would need to know how to iterate through the list and create the table in html script as I iterate through the list.
I have done this so far:
print'''
<html>
<head>
</head>
<body>
<center>
<table border="0" cellspacing="15">
<tr>
<td align="center" style="font-size:1.25em;">
<p class="sansserif"> <b> Number: %d </b> <br>
Letter: %s </p>
</td>
</tr>
</table>
</center>
</body>
</html>'''%(Number, Letter)
But this is really not iterating through the list, I just know the list size and have done the necessary code for it. Also this just prints outs:
0
A
within a cell of a table