You can use exec for that:
exec
>>> foo = "bar" >>> exec(foo + " = 'something else'") >>> print bar something else >>>
1.4m articles
1.4m replys
5 comments
57.0k users