I have the following dict:
a = {'chance': {'instance1': '', 'instance2': '', 'instance3': '', 'instance4': ''}}
, I want to be able to return like this with loops, while loading from a list:
{'chance': {'instance1': '1', 'instance2': '2', 'instance3': '3', 'instance4': '4'}}
the list looks like this:
pol=["1","2","3","4"]
I tried doing it with loops like this:
for i in range(1,5):
for j in range(4):
print(j)
or like this:
for line in inst['chance']:
miroute = re.match('instance*', line)
if miroute:
for i in range(4):
print(i)
break
print(miroute)
but with no success, do you have any idea how to process it