title: How to print out all cells of a table row in Beautiful Soup
body: <p>I'm just starting to learn how to use Beautiful Soup.</p>
  
  <p>As an exercise, I picked <a href="http://www.espn.com/espn/print?id=20443164" rel="nofollow noreferrer">this page from ESPN</a>.</p>
  
  <p>There's a table in there with NBA players and their fantasy ranks.
  I was able to print the whole row out and it shows everything I see in my browser.</p>
  
  <p>However, when I go to print each cell by itself, it prints out "None" because for some reason, it can't parse a cell that contains an anchor</p>
  
  <p>Here's my code below:</p>
  
  <pre><code>from bs4 import BeautifulSoup
  
  import urllib2
  import re
  
  if __name__ == '__main__':
     url = "http://www.espn.com/espn/print?id=20443164"
     resp = urllib2.urlopen(url)
     soup = BeautifulSoup(resp.read())
  
     table = soup.find_all("table")
     mytable = table[2]
     rows = mytable.findChildren(['th','tr'])
     print rows
     for row in rows:
         cells = row.findChildren('td')
         for cell in cells:
  #           print cell.string  # line in question
             print cell  # line in question
  </code></pre>
  
  <p>If I use </p>
  
  <pre><code>print cell
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>&lt;td&gt;1. &lt;a href="http://www.espn.com/nba/player/_/id/3032977/giannis-antetokounmpo"&gt;Giannis Antetokounmpo&lt;/a&gt;, SF/PF&lt;/td&gt;
  &lt;td&gt;PHI&lt;/td&gt;
  &lt;td&gt;C24&lt;/td&gt;
  </code></pre>
  
  <p>If I use</p>
  
  <pre><code>print cell.string
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>None
  MIL
  SF1
  </code></pre>
  
  <p>So how can I make everything print out without the "td" tags but recognize everything in the first cell without printing "None"?</p>