eval combines values from dictionary : eval « Buildin Function « Python Tutorial






scope = {} 
scope['x'] = 2 
scope['y'] = 3 
eval('x * y', scope) 

scope = {}
exec 'x = 2' in scope
eval('x*x', scope)








13.15.eval
13.15.1.eval() evaluates an expression
13.15.2.eval combines values from dictionary
13.15.3.Evaluate string