Q:

How to find a value in a table with no identifiers? (Python, Selenium)

I have a webpage with a table with many rows. A user will give me a number (15308) which can be found in the top line with the first <td> tag, and this is the only information I will have. I want to be able to use this number to find the data between the <th></th> tag (more specifically the 0), but only for the table row. For example, I attached two table rows and I want the <th> data using the number 15308, but not the <th> data from the table row that has the number 15309 in it's first <td>. Any help is appreciated!
Desired Output: 0
<tr>
<td><a href="http://sdb.admin.uw.edu/timeschd/UWNetID/sln.asp?QTRYR=SPR+2019&amp;SLN=15308">15308</a></td>
<td nowrap="">INFO   101  </td>
<td>A </td>
<td align="CENTER">LC</td>
<td>SOCIAL NETWORKING   </td>
<td align="CENTER"> 150</td>
<td align="CENTER"> 150</td>
<td align="CENTER"> 250</td>
<th align="CENTER">  0</th><td align="CENTER"> 229</td>
<td></td>
</tr>
<tr><td><a href="http://sdb.admin.uw.edu/timeschd/UWNetID/sln.asp?QTRYR=SPR+2019&amp;SLN=15309">15309</a></td>
<td nowrap="">INFO   101  </td>
<td>AA</td>
<td align="CENTER">LB</td>
<td>SOCIAL NETWORKING   </td>
<td align="CENTER">  25</td>
<td align="CENTER">  25</td>
<td align="CENTER">  26</td>
<th align="CENTER" style="">  2</th><td align="CENTER">  21</td>
<td></td>
</tr>

A:

Use Following code : 
userValue='15308'
all_td_th_of_row = driver.find_elements_by_xpath("//td[normalize-space()='" + userValue + "']//following-sibling::td|th")
i = 0
while i<len(all_td_th_of_row) : 
    print(all_td_th_of_row[i].text)
    i=i+1

