|
非常感谢回复,试了一下,结果一样。
代码修改如下:import time
while 1:
for i in range(6):
print('绿灯,还有',end='\r')
time.sleep(1)
运行结果如下:
Python 3.7.5 (tags/v3.7.5:5c02a39a0b, Oct 14 2019, 23:09:19) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>>
================ RESTART: D:/0002个人学习/pythoncx/fanhuihangshou.py ===============
绿灯,还有绿灯,还有绿灯,还有绿灯,还有 |
|