Skip to content

Instantly share code, notes, and snippets.

@vaishaks
Created January 22, 2015 08:07
Show Gist options
  • Save vaishaks/ebf231269b53eafb4447 to your computer and use it in GitHub Desktop.
Save vaishaks/ebf231269b53eafb4447 to your computer and use it in GitHub Desktop.
csvstring = ''
for i in xrange(start, stop+1):
cols = rows[i].find_all('td')
for col in cols:
try:
csvstring = csvstring + col.contents[0] + ','
except IndexError:
pass
csvstring = csvstring + '\n'
print csvstring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment