S
s99999999s2003
hi
i wish to generate a table using cgi
toprint = [('nickname', 'justme', 'someplace')]
print '''<table border="1">
<tr>
<td>User</td>
<td>Name</td>
<td>Address</td>
</tr>
<tr>
'''
for i in range(0,len(toprint)-1):
for j in range(0,len(toprint[0])-1):
print "<td> %s </td>" % toprint[j]
print '''</tr>
</table>'''
but it only prints out a table with "User | Name | address"
it didn't print out the values of toprint
is there mistake in code? please advise
thanks
i wish to generate a table using cgi
toprint = [('nickname', 'justme', 'someplace')]
print '''<table border="1">
<tr>
<td>User</td>
<td>Name</td>
<td>Address</td>
</tr>
<tr>
'''
for i in range(0,len(toprint)-1):
for j in range(0,len(toprint[0])-1):
print "<td> %s </td>" % toprint[j]
print '''</tr>
</table>'''
but it only prints out a table with "User | Name | address"
it didn't print out the values of toprint
is there mistake in code? please advise
thanks