Chuk Norris Jokes Challenge

wherever comma(,) is there it is getting into another column please tell how to correct it . i have tried using replace but still it isn’t working

with open(“ID.csv”,‘w’,encoding=‘utf-8’) as f:
for a in range(1,500):
try:
a=str(a)
url=“http://api.icndb.com/jokes/”+a
url_data=urlopen(url)
data=url_data.read()
json_file=json.loads(data)
st=json_file[‘value’][‘joke’]
#st=st.replace(’,’,’ ‘)
data=a+’,’+st
data+=’\n’
f.write(data)
except Exception:
pass