tables=android_soup.findAll(‘table’,{‘class’ : ‘wikitable’})
android_table=tables[0]
table_rows=android_table.findAll(‘tr’)[1:]
filename=‘android_version_history.csv’
column_titles=[]
with open(filename,‘w’,encoding=‘utf-8’) as f:
header_string=’,’.join(column_titles)
header_string += “\n”
f.write(header_string)
for row in table_rows:
row_string=" "
row_string=','.join(row)
row_string +='\n'
f.write(row_string)