Hello!
How can ask my scipt to print every word in a url page that starts with the letter "A" in this case?
This is my code:
from bs4 import BeautifulSoup
import urllib2
url = 'http://www.thefamouspeople.com/singers.php'
html = urllib2.urlopen(url).read()
soup = BeautifulSoup(html)
for word in soup.text:
if soup.text.startswith('A'):
print soup.text
But it doesn't print anything for output.