python use a variable as a dictionary key code example
Example: python declare variables from dictionary
>>> d = {'a':1, 'b':2}
>>> for key,val in d.items():
exec(key + '=val')
>>> d = {'a':1, 'b':2}
>>> for key,val in d.items():
exec(key + '=val')