>>> x =1
>>> del x
>>> x
Traceback (most recent call last):
File "<pyshell#55>", line 1, in <module>
x
NameError: name 'x' is not defined
>>> x = ['Hello', 'World']
>>> y = x
>>> y[1] = 'python'
>>> x
['Hello', 'python']
>>> y
['Hello', 'python']
>>> del x
>>> y
['Hello', 'python']
exec执行一些列python语句
>>> exec ("print ('Hello world')")
Hello world
>>> from math import sqrt
>>> exec ('sqrt = 1' , zuoyongyu)
>>> zuoyongyu['sqrt']
1
>>> sqrt(4)
2.0
eval 函数 计算python表达式 并返回其值
>>> scope = {}
>>> scope['x'] =2
>>> scope['y'] = 3
>>> scope
{'x': 2, 'y': 3}
>>> eval('x*y',scope)
6