Let's say I have a list of dictionaries that look like this:
final_list = [{'city': 'value', 'population': 'value'}, {'city': 'value', 'population': 'value'}, {'city': 'value', 'population': 'value'}]
And I have a list of lists that looks like this:
input_list = [['London', 'New York', 'San Francisco'], [8908081, 8398748, 883305]]
I'm trying to map the proper values from input_list to final_list, but I can't figure out how. I'd imagine it would be something like:
n = 0
while n < len(final_list):
for category in input_list:
for section in final_list:
# then here, somehow say
# for the nth item in each of the sections, update the value to nth item in category
# then increment n
Any help would be much appreciated! Thanks in advance :)