[Tips] python print 刷新显示 方式1: import sys sys.stdout.write(' ' + '输出string') sys.stdout.flush() 方式2: print(' ' + '输出string', end='', flush=True)