运行效果:
$ python3 解释器.py
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 05:52:31)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
(ZhPyConsole)
>>> 学
Traceback (most recent call last):
File "<console>", line 1, in <module>
命名错误: 命名'学'未定义
>>> for i in range(1,4):
... 生
...
Traceback (most recent call last):
File "<console>", line 2, in <module>
命名错误: 命名'生'未定义