[Tips] python print 刷新显示

方式1:

import sys

sys.stdout.write('\r' + '输出string')
sys.stdout.flush()

 

方式2:

print('\r' + '输出string', end='', flush=True)
posted @ 2020-05-11 15:28  虚无真仙  阅读(2003)  评论(0编辑  收藏  举报