Python convert dictionary to CSV
问题 I am trying to convert dictionary to CSV so that it is readable (in their respective key). import csv import json from urllib.request import urlopen x =0 id_num = [848649491, 883560475, 431495539, 883481767, 851341658, 42842466, 173114302, 900616370, 1042383097, 859872672] for bilangan in id_num: with urlopen("https://shopee.com.my/api/v2/item/get?itemid="+str(bilangan)+"&shopid=1883827")as response: source = response.read() data = json.loads(source) #print(json.dumps(data, indent=2)) data