I have a cgi script in python that outputs a html table, but i also need to count the number of rows in that specific table. Any ideas on how i can proceed?

Thanks in advance,


Look for a delimiter between the rows and .count() them.



Thanks for the delimiter idea, i'll try that as well. I inserted a count function within the loop that prints the table rows. i.e everytime it prints a specific row the count value increases by one as follows:

count = 0
for word in alist:
                word = word.strip() 
        count += 1
        print "<td> ",word,"</td>"