import sys,timefor i in range(50): sys.stdout.write("#") sys.stdout.flush() #强制不等待buffer满,直接写入内存 time.sleep(0.1)