我用了两个环境测试(都是windows,因为我不会用linux,只会用windows):
一个是python 3.7.3(32-bit),在IDLE中运行。第二个是spyder 5.0.3,里面的python好像是3.8.8 64-bit
我不是在IDLE中一行行敲的代码,是写了一个.py的文件,然后运行得到的结果。
>>>是显示运行结果的IDLE中自带的,说明后面跟的是运行结果,全景是下面这个样子。
Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
=== RESTART: D:\example3-3-1.py ===
The Endreading
>>> 0
reading 1
reading 2
【 在 ilovecpp 的大作中提到: 】
: 我试了下,输出符合你的期望。Python 3.9.5, Linux。
: 理论上
: The End
: ...................
--
FROM 1.95.148.*