python function to with variable name 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
>>>