How to append several dictionaries while looping through pagination (API) - python 3
问题 I would like to loop through several pages of data which I am accessing through an API, and concatenate the pages to the same dictionary as the loop progresses. So far I managed to loop through all the pages and could print out as the loop goes on, so when the loop is over, all the pages are printed out. But my dictionary contains only the last page! page = 5 i = 0 for i in range(0, page): url =f'http://hotell.difi.no/api/json/npd/wellbore/withcoordinates?page={i+1}' dataset_all = requests