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