iteratively its not taking id from 97 to 109 instead it is takin from the beginning till the end ???
And for single joke it is working fine
l=[97,98,99,100,101,102,103,104,105,106,107,108,109]
for i in l:
url="http://api.icndb.com/jokes/i/json?"
r=requests.get(url)
place=r.content.decode(“utf-8”)
res = json.loads(place)
print(res)
with open(assignment,‘w’)as f:
string=’’.join(res[“value”][“joke”])
f.write(string)
Chuk Norris Jokes
Hey @yash443388, yes first you need to make dictionary, of id vs joke, and than load the test.csv and than append in the ans list.
Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. 