Python Verwenden Sie den variablen Namen als Variable
>>> foo = "bar"
>>> exec(foo + " = 'something else'")
>>> print bar
something else
>>>
Important Ibex
>>> foo = "bar"
>>> exec(foo + " = 'something else'")
>>> print bar
something else
>>>