eval()

The eval() function evaluates an expression and returns the result.

 
>>> a = 1
>>> eval("a+2")
3