Possible Duplicate:
How can I assign the value of a variable using eval in python?
i want to assign a value to a variable that is inside of a string using python
so suppose
y = 'x = 5'
eval(y) # does not work
I want something that evaluates this expression so that x = 5
in python