I'm using an API to gather data on businesses in an area and am trying to parse out the results. My code converts the JSON into a python dictionary and I was able to print several items from the dictionary together in my code below.
However, I would like instead to append the results to a list that I can eventually output to a csv file. How would I change the following code below from print, to instead append all of these items to a comma separated list?
for item in data['businesses']:
print (item['name'], item['rating'], item['review_count'], item['location']['address'])
I'm fairly new to python and coding so I appreciate any additional details or explanations you can provide to the simplest approach.