I have a list of values, and a dictionary of dictionaries. They look something like this:
d = {1 : {1 : '', 2 : '', 3 : ''},2 : {1 : '', 2 : '', 3 : ''}}
l = ['Erich Martin', 'Zia Michael', 'Olga Williams', 'Uma Gates']
I am trying to map the values from the list into the dictionary, filling each dictionary before moving on to the next nested dictionary. The last dictionary would have some empty slots, and that's fine. I can't seem to wrap my head around what I need to do; I run into the end of the list and get a keyerror, as there are no more values. Here's the gist of what I've got so far:
for g,s in d.items():
for i in s:
s[i] = l.pop()
Using Python 3.4.
Thanks!