title: How to get list of TDs in TR row with BeautifulSoup
body: <p>I have a simple table that looks like:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;td&gt;cell1&lt;/td&gt;
  &lt;td&gt;cell2&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;cell3&lt;/td&gt;
  &lt;td&gt;cell4&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>I'm using beautiful soup to try and map the contents of the TDs to object values.</p>
  
  <p>I'm doing the following:</p>
  
  <pre><code>rows = soup.findAll('tr')
     for td in rows[1]:
        print(td.text)
  </code></pre>
  
  <p>This prints:</p>
  
  <pre><code>cell1
  cell2
  cell3
  cell4
  </code></pre>
  
  <p>I want to get the specific index of each cell.  For example:</p>
  
  <pre><code>print(td[0])
  </code></pre>
  
  <p>I get the error:</p>
  
  <pre><code>KeyError: 0
  </code></pre>
  
  <p><strong>How can I get the index of each TD?</strong></p>