I need to generate a number of variables in a loop. I achieved this by using this code:
nBottom=list of initially unknown size
loc=locals()
for k,val in enumerate(nBottom) : loc["imp_local"+str(k)]=700
for k,val in enumerate(nBottom) : loc["imp_global"+str(k)]=600
Now I need to work with them, by creating a dictionary like:
dic1={'imp_local0': 700, ..., 'imp_localn': 700}
dic2={'imp_global0': 700, ..., 'imp_globaln': 700}
How can I do this?