variable name of variable python code example
Example: python use variable name as variable
>>> foo = "bar"
>>> exec(foo + " = 'something else'")
>>> print bar
something else
>>>
>>> foo = "bar"
>>> exec(foo + " = 'something else'")
>>> print bar
something else
>>>