今日小技巧GET
Python 控制台輸出時重新整理目前行内容
為了跑代碼時不至于對了白屏發呆,提高使用者(自己)體驗,經過幾次嘗試,正确代碼如下:
import time
for i in range(100):
time.sleep(0.1)
print("\rReading image {}/{}".format(1+i,100),end='')
今日小技巧GET
Python 控制台輸出時重新整理目前行内容
為了跑代碼時不至于對了白屏發呆,提高使用者(自己)體驗,經過幾次嘗試,正确代碼如下:
import time
for i in range(100):
time.sleep(0.1)
print("\rReading image {}/{}".format(1+i,100),end='')