Web scrapping special symbols

i am getting special symbols in csv
don;t know y
can u help me in his

from urllib.request import urlopen
android_url = “https://en.wikipedia.org/wiki/Android_version_history
android_data = urlopen(android_url)
print(android_data)

android_html = android_data.read()
print(android_html)
android_data.close()

from bs4 import BeautifulSoup as soup
a_soup = soup(android_html,‘html.parser’)
print(a_soup)

alen = a_soup.findAll(‘table’,{‘class’:‘wikitable’})
print(len(alen))

a_table = alen[0]
print(a_table)

headerList = a_table.findAll(‘th’,{})
h1 = [h.text[:-1] for h in headerList]
print(h1)

rc = a_table.findAll(‘tr’,{})[1:]
#print(rc)
tr = []
for rd in rc:
rowdata = [ r.text[:-1] for r in rd.findAll(‘td’)]
tr.append(rowdata)
print(tr)

filename = “android_history.csv”

with open(filename,‘w’,encoding=‘utf-8’) as f:
hdstr = “,”.join(h1)
hdstr+="\n"
print(hdstr)
f.write(hdstr)

for s in tr:
    r1 = ",".join(s)
    r1+="\n"
    f.write(r1)

hey @Ramu-Rebal-2078248865781508 ,
Just worry about that it as an excel encoding issue to read text from csv. So , in future if you are going to work with python only then you can easily read it as a csv file properly.
But if you still need it to be in .xlsx format. Then i would suggest you using pandas for this.
Just use the below code :
import pandas as pd
pd.DataFrame(tr,columns=h1).to_excel("android_history_pandas.xlsx",index=None)

I hope this would have helped you to resolve your doubt.
Thank You and Happy Learning :slightly_smiling_face:.

Note : We see a same doubt from your side , so we would request you to kindly close that doubt and continue your queries here itself.