I am an python newbie trying to create data in json by iterating a for loop like {region1: title1, region2:title2}
Logic:
import json
for region in ["region1","region2","region3"]:
title="logic to get the title in region"
data = {region: title}
# like to update_json.update(data) from second run
I would like the data to be appended with region:title for each loop run. Thanks in advance.